Probability and Statistical PDF
Document Details
Tags
Summary
This document provides an introduction to probability and statistics, covering topics such as the role of probability in predictions, data summarization and analysis, hypothesis testing, and more. It details various data analysis techniques.
Full Transcript
Unit2 Probability and Statistical Introduction to Probability and Statistics Why Probability and Statistics? – Probability and statistics provide the foundation for extracting insights, modeling scenarios, and making data-driven decisions. – Essential fo...
Unit2 Probability and Statistical Introduction to Probability and Statistics Why Probability and Statistics? – Probability and statistics provide the foundation for extracting insights, modeling scenarios, and making data-driven decisions. – Essential for anyone pursuing a career in data analytics. Reasons why probability and statistics is crucial for Data Analytics are given below Data Analysis and Predictions Role of Probability in Predictions – Probability theory helps predict the likelihood of different outcomes. – Application: Inferences and predictions in data analytics. – Key Point: Making accurate predictions is central to data analytics. Data Summarization and Analysis Statistical Tools for Summarization Measures of central tendency (mean, median, mode). Variability (range, variance, standard deviation). Application: Identify patterns and relationships. Key Techniques: Regression analysis, variance analysis. Hypothesis Testing Understanding Hypothesis Testing – Statistical methods to validate a hypothesis about a population. – Application: Drawing valid conclusions and making informed decisions. Machine Learning and Predictive Modeling Probability & Statistics in Machine Learning – Foundation for algorithm design and predictive modeling. – Application: Crucial for developing machine learning models. Decision-Making in Business Informed Decision-Making – Statistical methods guide decisions in product development, marketing, and more. – Key Concept: Quantifying risks and understanding outcomes for data- driven strategies. Quality Control and Improvement Statistical Process Control (SPC) – Monitor and control process variability. – Application: Ensuring product or service quality in industries like manufacturing. Experimentation and Research Designing Experiments and Analyzing Data – Statistical methods for R&D, collecting, and interpreting data. – Key Point: Drives scientific discoveries and new product development. Consumer Behavior Analysis Understanding Consumer Preferences – Statistical analysis of consumer behavior and trends. – Application: Marketing strategies and product development insights. Handling Big Data Statistical Techniques for Big Data – Extracting actionable insights from large, complex datasets. – Key Concept: Turning big data into valuable knowledge. What is Probability? Definition: – Probability refers to the likelihood or chance of a particular event happening. – Range: Values between 0 and 1. – 0: Event is impossible. – 1: Event is certain to occur. Application: Crucial in various fields, including finance, insurance, and healthcare for making informed decisions. Key Concepts of Probability Random Event: – An outcome that cannot be predicted with certainty. – Example: Tossing a coin or rolling a die. Outcome: The result of a random event. – Example: Getting heads or tails in a coin toss. Sample Space (S): – The set of all possible outcomes. – Example: In a coin toss, the sample space is {Heads, Tails}. Event (E): – A specific outcome or a combination of outcomes. Example: Getting a head in a coin toss. Formula for Probability Probability of an Event (P(E)): – Formula: – n(E): Number of favorable outcomes. – n(S): Total number of possible outcomes. Example: Tossing a coin: Favorable outcome (n(E)): 1 (either head or tail). Total outcomes (n(S)): 2 (head, tail). P(Head) = 1/2 = 0.5 Interpretation: There is a 50% chance of getting heads. Types of Probability 1. Theoretical Probability: – Based on the possible outcomes without actual experimentation. – Example: Probability of rolling a 6 on a die is 1/6 2. Experimental Probability: Based on actual experiments or trials. Formula: Example: After rolling a die 10 times, if you get a 6 twice, then: 3. Complementary Probability: Definition: The probability of an event not happening is called complementary probability. Formula: Example: If the probability of rain tomorrow is 0.7, the probability of no rain is: 4. Conditional Probability Definition: The probability of an event occurring given that another event has already occurred. Formula: Example: Drawing two cards from a deck, where the probability of drawing a King given the first card drawn was an Ace. Examples of Probability Rolling a Die Example Coin Toss Example Scenario: Scenario: Rolling a fair six-sided die. Tossing a fair coin. Probability: Probability: The probability of rolling a 3 is The probability of getting a head is 1/2 Explanation: Explanation: There are six equally likely outcomes (1, There are two equally likely outcomes: 2, 3, 4, 5, 6). heads or tails. Formula: Formula: Conclusion: The chance of rolling a 3 is Conclusion: There is a 50% chance of approximately 16.67% getting heads. Examples of Probability Drawing a Card Example Weather Forecast Example Scenario: Scenario: Drawing a card from a standard deck of Predicting whether it will rain tomorrow. 52 playing cards. Probability: Probability: The probability of rain is 0.3 (30%). Formula: Explanation: – Based on historical data and Explanation: meteorological forecasts, the chance of rain tomorrow is calculated to be 30%. There are 13 hearts out of 52 cards. – Interpretation: There is a 30% chance of Therefore the probability of drawing a rain, indicating the uncertainty in weather heart is 1/4 predictions. What is a Sample Space? Definition: – The sample space is the set of all possible outcomes of a random experiment. – Denoted by 𝑆 Examples: – The individual outcomes in a sample space are called sample points or elements. Formula: 𝑆={all possible events} – A sample space can be finite or infinite. Finite and InFinite Sample Space Examples Finite Sample Space InFinite Sample Space 1. Throwing a Die: 1. Coin Toss until Head Appears: – Sample Space 𝑆={1,2,3,4,5,6} – Sample Space S={1,2,3,4,…} – Type: Finite sample space. – Explanation: The experiment continues until 2. Tossing Two Coins Simultaneously: a head is obtained, and thus the number of – Sample Space S={HH, HT, TH, TT} possible outcomes is infinite. – Type: Infinite sample space. – Type: Finite sample space. 2. Hitting a Target: – Sample Space S={1,2,3,…} – Explanation: This experiment also has an infinite number of possible outcomes. – Type: Infinite sample space. Sample Space for Two Coins & Two Dice 1. Tossing Two Coins: – Sample Space S={(H, H),(H, T),(T, H),(T, T)} 2. Rolling Two Dice: – Sample Space S={(1,1),(1,2),(1,3),…,(6,6)} What is an Event? Definition: – An event is a subset of the sample space. – Denoted by A,B,C, etc. – Events are subsets of S, so concepts like union, intersection, and complements apply to events in probability. Example: – If you roll a die, an event could be rolling an even number, A={2,4,6}. Example 1 - Throwing a Die Scenario:Events – A fair six-sided die is rolled. Defining the Event: – Event A: The die roll results in an even number. – Event Set A={2,4,6} – Type of Event: Compound event (consists of multiple outcomes). Explanation: – If we roll a 2,or 4, or 6, then event A occurs. – This means the outcome is in the set A, and the event is considered to have "happened." Example 2 - Tossing Two Coins Scenario: – Two fair coins are tossed simultaneously. Defining the Event: – Event B: At least one coin lands on heads. – Event Set B={HH,HT,TH} – Type of Event: Compound event (consists of multiple outcomes). Explanation: – If the outcome is HH (both heads), HT (first heads, second tails), or TH (first tails, second heads), then event B occurs. – The event happens as long as at least one coin shows heads. Types of Events: 1.Complement of an Events 2.Sub-Events 3. Union of Two or More Events 4. Intersection of Events 5.Equally Likely Events (Equiprobable Events) 6.Mutually Exclusive Events (Disjoint Events) 7.Exhaustive Event (Exhaustive Set of Events) 8.Independent and Dependent Events Examples 2/4->1/2 Measures of Probability Measures of Probability Properties of Probability Properties of Probability Properties of Probability Solved Examples Question: Find the probability of drawing one white marble from a bag containing 5 white and 5 red marbles. Solved Examples Conclusion: The probability of drawing one white marble from a bag of 10 marbles (5 white and 5 red) is 50%, demonstrating an equal likelihood of drawing either color. Question: Find the probability of drawing 4 black marbles from a bag containing 6 white and 6 black marbles. Classical vs. Empirical Approaches to Probability Conclusion: Both classical and empirical approaches provide valuable insights into probability, with the classical approach offering theoretical precision and the empirical approach offering practical, data-driven estimates. Solved Examples in Probability Example 1: Probability of a Male Newborn Problem Statement:Out of 600 babies born in a hospital in a year, 260 were male. Find the probability that a newborn baby is male. Solved Examples in Probability Example 2: Probability of Team A Winning Problem Statement:Team A has played 100 cricket matches with Team B. Among them, 20 matches were won by Team A. Find the probability that Team A will win the 101st match. Probability Calculations from a Life Table 80 40,000 Find the probability that (1) A person aged 20 lives till he is 80 (2)a new-born baby survives up to the age of 20 years (3)a person aged60 lives for 20 more years Conclusion: The probabilities calculated from the life table provide insights into the likelihood of survival and longevity at different ages. The Axiomatic Approach to Probability Definition: The axiomatic approach to probability is based on a set of mathematical axioms or rules that define the properties of probability. It is used in complex scenarios where outcomes are not equally likely or empirical data is unavailable. The Axiomatic Approach to Probability Probability Theorems(Addition Theorem of Probability) A B m1 m3 m2 S=n Addition Theorem(For Mutually Exclusive Events) S(n) A(m1) B(m2) Addition Theorem(For Mutually Exclusive Events) Addition Theorem(For Mutually Exclusive Events) EXAMPLES 1. Suppose we flip two coins, one after the other. Let S be the sample space of all possible outcomes. Assign a probability of 0.25 to each element of the sample space. Let A be the event that the first coin lands heads, and B be the event that the second coin lands heads. Calculate the probability of the union of events A and B. 2. Show that (i) P (AUB) ≤P (A) + P(B) (ii) P (A B) = P(A) + P(B) - P (AUB) 3. A bag contains 15 white and 5 blacks marbles. Find the probability of drawing two marbles of the same colour. 4. Three horses E1, E2, and E3, are in a race. The horse E1, is twice as likely to win as E2, and E2 is twice as likely to win as E3. Find their respective probabilities P(E1) P(E2) and P(E3) of winning. What is the probability that E2, or E3, wins? 5. A and B are two candidates seeking admission in a college. The probability that A is selected is 0.7 and the probability that exactly one of them is selected is 0.6. Find the probability that B is selected. Conditional Probability and Independence Conditional Probability and Independence Conditional Probability and Independence Examples 1. A family has 2 children.Given that one of the children is boy,what is the probability that the other child is also boy? 2. Suppose 36% of families own a dog, 30% of families own a cat, and 22% of the families that have a dog also have a cat. A family is chosen at random and found to have a cat. What is the probability they also own a dog? 3. Suppose 30% of the women in a class received an 'A' on the test and 25% of the men received an 'A'. The class is 60% women. Given that a person chosen at random received an 'A', what is the probability this person is a women? 4. 10% of the bulbs produced in a factory are of red colour and 2% are red and defective. If one bulb is picked up at random, determine the probability of its being defective if it is red. 5. Two dice are thrown together. Let A be the event 'getting 6 on the first die' and B be the event 'getting 2 on the second die'. Are the events A and B independent? MULTIPLICATION THEOREM(Theorem of Compound Probability) MULTIPLICATION THEOREM(Theorem of Compound Probability) Note: This formula simplifies the calculation when events are independent. Examples 1. What is the chance of throwing a total of 6 or 5 or 11 with two dice. 2. When a die is thrown, E, is event of getting odd number, and E, is the event getting multiple of two. E, and E, are they independent event. 3. A bag has 10 bolts out of which 4 are defective. Find the probability of drawing two non-defective bolts simultaneously. 4. A problem is given to three students A, B and C whose probabilities of solving are2 /3,3/4,and1/4. what is the probability that the problem is solved. 5. Three machines A B and C products 40%, 50% and 10% of the total productions out which 2% 4% and 1% are defective. Find the probability that an item selected at random is (i) Defective(ii) Is defective and manufactured by machine A. 6. If P(A u B) = 0.65 and P(A n B) = 0.15, find P(A)+P(B) 7. 8. A number is chosen from the first 100 natural numbers. Find the probability that it is a number multiple of 4 or 6 Example 1 -Chance of Throwing a Total of 6, 5, or 11 with Two Dice Example 1 -Chance of Throwing a Total of 6, 5, or 11 with Two Dice Example 2 -Independence of Events: Rolling a Die Example 3 -Probability of Drawing Two Non-Defective Bolts Example 4 - Probability of Drawing Four Cards from a Pack solution solution Example 5 - Probability of Solving a Problem by Three Students (A, B, and C) Solution Solution Example 6 - Probability of Defective Products from Machines A, B, and C Solution Solution Solution Example 7 - Finding P(A)+P(B) Example 8 - Finding the Probability of Selecting a Multiple of 4 or 6 Example 8 - Finding the Probability of Selecting a Multiple of 4 or 6 Conclusion: The probability of selecting a multiple of 4 or 6 is 0.33 or 33%. Example 9 -Finding the Odds in Favor of A∪B Example 9 -Finding the Odds in Favor of A∪B Conclusion: The odds in favor of A∪B are 5:1. Properties of Independent Events Properties of Independent Events Properties of Independent Events Conclusion: Independent events maintain their independence even when combined with other events. Bayes' formula provides a relationship between conditional probabilities. Example 1 -Probability of Selecting a Committee with At Least Two Doctorates Example 1 -Probability of Selecting a Committee with At Least Two Doctorates Example 1 -Probability of Selecting a Committee with At Least Two Doctorates Conclusion: The probability that a randomly formed committee of 3 lecturers will have at least 2 doctorates is 0.7 or 70%. Example 2 - Probability with a Fair Coin Tossed Five Times Example 2 - Probability with a Fair Coin Tossed Five Times Example 3 - Probability of Rolling 6 on All Three Dice Conclusion: The probability that all three dice will show the number 6 is 1/216. Example 4 - Probability of Selecting at Least One Graduate Example 4 - Probability of Selecting at Least One Graduate Conclusion: The probability that at least one of the selected persons is a graduate is approximately 0.601. Bayes' Theorem Overview: – Bayes' Theorem is a fundamental concept in probability theory that describes the probability of an event based on prior knowledge of related events. Named after Reverend Thomas Bayes, it is a powerful tool for updating probabilities based on new information. Applications: – Medical Diagnosis – Machine Learning – Statistics – Decision-Making Processes Bayes' Theorem provides a systematic way to update probabilities with new evidence, helping us make more informed decisions in uncertain situations. Bayes' Theorem Derivation of Bayes’ Theorem Bayes' Theorem Bayes' Theorem Example Application: If you have a test for a disease with a known accuracy and prevalence rate, Bayes' Theorem helps you calculate the probability of having the disease given a positive test result. Conclusion: Bayes' Theorem helps update our beliefs about probabilities in light of new evidence, making it a crucial tool in fields involving uncertainty and inference. Example: Medical Test for a Disease Step-by-Step Solution: Conclusion: Given that a person tested positive, there is approximately a 16.67% chance that they actually have the disease. Despite the test's high sensitivity, the low prevalence of the disease and the relatively high false positive rate contribute to this surprisingly low probability. Bayes' Theorem helps in understanding the true implications of test results in the context of population prevalence. Example: Probability of Drawing an Ace Given It's a Heart Example: Probability of Drawing an Ace Given It's a Heart Example: Probability of Drawing an Ace Given It's a Heart Conclusion: If we know the card drawn is a heart, the probability that it is also an ace is 1/13 or approximately 7.69%. This demonstrates how Bayes' Theorem helps update the probability of an event based on new information. Applications of Bayes' Theorem 1. Medical Diagnosis: – Usage: Calculate the probability of a patient having a disease given the results of a medical test. – Example: Determining the likelihood of a disease based on test sensitivity and prevalence. 2. Spam Filtering: – Usage: Classify emails as spam or not spam based on their content. – Example: Using the frequency of certain words to identify spam emails. 3. Machine Learning: – Usage: Implement Naive Bayes classifiers to classify data based on probabilities. – Example: Categorizing text or images using probabilistic models. 4. Risk Assessment: – Usage: Calculate the probability of an event occurring based on prior knowledge and evidence. – Example: Estimating the likelihood of financial risks or insurance claims. Applications of Bayes' Theorem 5. Fraud Detection: – Usage: Identify fraudulent transactions based on patterns and probabilities. – Example: Detecting unusual transaction patterns in banking systems. 6. Natural Language Processing (NLP): – Usage: Classify and analyze text based on probabilities. – Example: Sentiment analysis and topic modeling. 7. Image Recognition: – Usage: Classify and identify images based on probabilistic models. – Example: Identifying objects or faces in images. 8. Decision-Making: – Usage: Update probabilities and make informed decisions based on new information. – Example: Adjusting investment strategies based on market data. Conclusion:Bayes' Theorem provides a powerful framework for updating probabilities and making informed decisions across various fields by incorporating new evidence and prior knowledge. Theorem-Law of Total Probability Theorem-Law of Total Probability Example 1 -Probability of Defective Bolts Example 1 -Probability of Defective Bolts Example 1 -Probability of Defective Bolts Example 1 -Probability of Defective Bolts Example 2 - Probability in a Class Example 3 - Probability of Being a Woman Given Height Example 4 - Bayes' Theorem: Probability of Defective Item from Machine C Find: The probability that an item was produced by machine C, given that it is defective. Example 5 - Bayes' Theorem: Probability of a Spectacle- Wearing Person Being Male Conclusion: The probability that a randomly chosen person wearing spectacles is male is 25%. Example 6 - Bayes' Theorem: Probability of Defective Item Produced by Machine C Conclusion: The probability that the defective item was produced by Machine C is 20.4%. Example 7 - Bayes' Theorem: Probability of Defective Article from Factory F3 Example - 8 Bayes' Theorem: Probability of Having a Disease Given a Positive Test Conclusion: Using Bayes' Theorem, we confirm that the probability of having the disease given a positive test is approximately 64.7%. Example 9 - Bayes' Theorem: Probability of Meeting Expectations Given Sales Experience Conclusion: Using this approach, we can estimate that 84.5% of new hires who have sales experience will meet the company’s expectations. Example 10 - Probability of a Defective Tube from Three Machines Example 11-Probability That a Standard Quality Car Came from Plant X