Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Probability and Statistics

Similar presentations


Presentation on theme: "Introduction to Probability and Statistics"— Presentation transcript:

1 Introduction to Probability and Statistics
Chapter 4 Probability and Probability Distributions Probability serves as the theoretical foundation of statistics. It is a tool to allow us to evaluate reliability of statistical conclusions. For example, if we toss a coin for 10 times and we get 10 heads in a row, we might not believe the coin is fair. Because if we assume it is a fair coin, the chance to have 10 heads in a row will be less than .1% using probability theory.

2 Probability Example: If we toss a coin 10 times and get 10 heads in a row; Question: Do you believe it is a fair coin? Answer: No. Reason: If the coin is fair, the chance to have 10 heads in a row is less than 0.1% (According to probability theory). Tool and foundation of statistics; Evaluate reliability of statistical conclusions… Probability is everywhere in our daily lives. For instance, when a weather man tells the chance of rain tomorrow, it is about probability. When we buy a lottery, we may concern about the chance of winning. How big is the chance we win; In probability language, what is the probability to win the lottery. Probability measures how likely something happens. Probability theory serves as a foundation of statistics.

3 Basic Concepts An experiment is the process by which an observation (or measurement) is obtained. Experiment: Record an age Experiment: Toss a die Experiment: Record an opinion (yes, no) Experiment: Toss two coins

4 Basic Concepts A simple event is the outcome that is observed on a single repetition of the experiment. The basic element to which probability is applied. One and only one simple event can occur when the experiment is performed. A simple event is denoted by E with a subscript.

5 Basic Concepts Each simple event will be assigned a probability, measuring “how often” it occurs. The set of all simple events of an experiment is called the sample space, usually denoted by S.

6 Simple events: Sample space:
Example The die toss: Simple events: Sample space: S ={E1, E2, E3, E4, E5, E6} 1 E1 E2 E3 E4 E5 E6 (or S ={1, 2, 3, 4, 5, 6}) 2 Venn Diagram 3 S E1 E6 E2 E3 E4 E5 5 4 6

7 Record a person’s blood type: Simple events: Sample space:
Example Record a person’s blood type: Simple events: Sample space: S ={E1, E2, E3, E4} E1 E2 E3 E4 A AB B S ={A, B, AB, O} O

8 An event is a collection of one or more simple events.
Basic Concepts An event is a collection of one or more simple events. S A B E1 E3 The die toss: A: an odd number B: a number > 2 E5 E2 E6 E4 A ={E1, E3, E5} B ={E3, E4, E5, E6}

9 Not Mutually Exclusive
Basic Concepts Two events are mutually exclusive (disjoint) if, when one event occurs, the other cannot, and vice versa. Experiment: Toss a die A: observe an odd number B: observe a number greater than 2 C: observe a 6 D: observe a 3 Not Mutually Exclusive Mutually Exclusive A and C? A and D? B and C?

10 The Probability of an Event
The probability of an event A measures “how often” we think A will occur. We write P(A). Suppose that an experiment is performed n times. The relative frequency for an event A is If we let n get infinitely large,

11 The Probability of an Event
P(A) must be between 0 and 1. If event A can never occur, P(A) = 0. If event A always occurs, P(A) =1. The sum of the probabilities for all simple events in S equals 1. P(S)=1. The probability of an event A can be found by adding the probabilities of all the simple events in A.

12 Finding Probabilities
Probabilities can be found using Estimates from empirical studies Common sense estimates based on equally likely events. Examples: Toss a fair coin. P(Head) = 1/2 10% of the U.S. population has red hair. Select a person at random. P(Red hair) = .10

13 Example Toss a fair coin twice. What is the probability of observing at least one head (event A)? Exactly one Head (event B)? 1st Coin 2nd Coin Ei P(Ei) P(at least 1 head)= P(A) = P(E1) + P(E2) + P(E3) = 1/4 + 1/4 + 1/4 = 3/4 H HH 1/4 H T HT H TH P(exactly 1 head)=P(B) = P(E2) + P(E3) = 1/4 + 1/4 = 1/2 T T TT Tree Diagram

14 Example A bowl contains three M&Ms®, two reds, one blue. A child selects two M&Ms at random. Probability of observing exactly two reds? r1 r2 b 1st M&M 2nd M&M Ei P(Ei) b r1b 1/6 r1 r2 P(exactly two reds) = P(r1r2) + P(r2r1) = 1/6 +1/6 = 1/3 r1r2 b r2b r2 r1 r2r1 r1 br1 b r2 br2

15 Example A bowl contains three M&Ms®, one red, one blue and one green. A child takes two M&Ms randomly one at a time. What is the probability that at least one is red? 1st nd Ei P(Ei) 1/6 RB RG BR BG m GB GR P(at least 1 red) = P(E1) + P(E2) + P(E3)+P(E6) = 1/6 + 1/6 + 1/6+1/6 = 4/6

16 Example Toss a fair coin 3 times. What is the probability of observing at least two heads (event A)? Exactly two Heads (event B)? Simple Events Probabilities A={HHH, HHT, HTH, THH} HHH 1/8 P(at least 2 heads)=P(A) = P(HHH)+P(HHT)+P(HTH)+P(THH) = 1/8 + 1/8 +1/8 + 1/8 = 1/2 HHT HTH HTT B={HHT,HTH,THH} THH P(Exactly 2 heads)= P(B) = P(HHT) + P(HTH) + P(THH) = 1/8 + 1/8 + 1/8 = 3/8 THT TTH TTT

17 Not Mutually Exclusive
Example A: at least two heads; B: exactly two heads; C: at least two tails; D: exactly one tail. Questions: A and C mutually exclusive? B and D? Simple Events HHH A={HHH,HHT,HTH,THH} HHT Mutually Exclusive HTH HTT C={HTT,THT,TTH,TTT} B={HHT,HTH,THH} Represent events THH Not Mutually Exclusive THT TTH D={HHT,HTH,THH} TTT

18 Example Toss a fair coin twice. What is the probability of observing at least one head (Event A)? S={HH, HT, TH, TT} A={HH, HT, TH} 1st Coin 2nd Coin Ei P(Ei) P(at least 1 head) = P(A) = P(HH) + P(HT) + P(TH) = 1/4 + 1/4 + 1/4 = 3/4 H HH 1/4 H T HT H TH T T TT

19 Example A bowl contains three M&Ms®, two reds, one blue. A child selects two M&Ms at random. What is the probability that exactly two reds (Event A)? r1 r2 b 1st M&M 2nd M&M Ei P(Ei) A={r1r2, r2r1} b r1b 1/6 r1 r2 P(A) = P(r1r2) + P(r2r1) = 1/6 +1/6 = 2/6=1/3 r1r2 b r2b r2 r1 r2r1 r1 br1 b r2 br2

20 Counting Rules We can use counting rules to find #A and #S.
If the simple events in an experiment are equally likely, we can calculate We can use counting rules to find #A and #S.

21 Counting How many ways from A to C? City A City B City C
3  2 = 6 How many ways from A to D? City A City B City C City D 3  2  2 = 12

22 The mn Rule 2  2 = 4 For a two-stage experiment,
m ways to accomplish the first stage n ways to accomplish the second stage then there are mn ways to accomplish the whole experiment. For a k-stage experiment, number of ways equal to n1 n2 n3 … nk Example: Toss two coins. The total number of simple events is: 2  2 = 4

23 Examples m Example: Toss three coins. The total number of simple events is: 2  2  2 = 8 Example: Toss two dice. The total number of simple events is: 6  6 = 36 Example: Two M&Ms are drawn in order from a dish containing four candies. The total number of simple events is: 4  3 = 12

24 Permutations Example: How many 3-digit lock passwords can we make by using 3 different numbers among 1, 2, 3, 4 and 5? The order of the choice is important! n distinct objects, take r objects at a time and arrange them in order. The number of different ways you can take and arrange is

25 Example Example: A lock consists of five parts and can be assembled in any order. A quality control engineer wants to test each order for efficiency of assembly. How many orders are there? The order of the choice is important!

26 Example How many ways to select a student committee of 3 members: chair, vice chair, and secretary out of 8 students? The order of the choice is important! ---- Permutation

27 Combinations n distinct objects, select r objects at a time without regard to the order. The number of different ways you can select is Example: Three members of a 5-person committee must be chosen to form a subcommittee. How many different subcommittees could be formed? The order of the choice is not important!

28 Example How many ways to select a student committee of 3 members out of 8 students? (Don’t assign chair, vice chair and secretary). The order of the choice is NOT important!  Combination

29 Question A box contains 7 M&Ms®, 4 reds and 3 blues. A child selects three M&Ms at random. What is the probability that exactly one is red (Event A) ? r1 r2 r3 r4 b1 b2 b3 Simple Events and sample space S: {r1r2r3, r1r2b1, r2b1b2…... } Simple events in event A: {r1b1b2, r1b2b3, r2b1b2……}

30 Solution Sample Space: Choose 3 MMs out of 7. (Total number of ways, i.e. size of sample space S) The order of the choice is not important! Event A: one red, two blues Choose one red 4  3 = 12 ways to choose 1 red and 2 greens ( mn Rule) Choose Two Blues

31 Event Relations - Union
The union of two events, A and B, is the event that either A or B or both occur when the experiment is performed. We write A B S A B

32 Event Relations-Intersection
The intersection of two events, A and B, is the event that both A and B occur. We write A B. S A B If A and B are mutually exclusive, then P(A B) = 0.

33 Event Relations - Complement
The complement of an event A consists of all outcomes of the experiment that do not result in event A. We write AC ( The event that event A doesn’t occur). S AC A

34 Example A: student is colorblind B: student is female
Select a student from a college A: student is colorblind B: student is female C: student is male Mutually exclusive and B = CC What is the relationship between events B and C? AC: BC: BC: Student is not colorblind Student is both male and female =  Student is either male or female = all students = S

35 Example Toss a coin twice A: At least one head {HH, HT, TH};
B: Exact one head {HT, TH}; C: At least one tail {HT, TH, TT}. {TT} No head AC: AB: AC: {HT, TH} Exact one head {HH, HT, TH, TT}=S -- Sample space

36 Probabilities for Unions
The Additive Rule for Unions: For any two events, A and B, the probability of their union, P(A B), is A B

37 Example: Additive Rule
Example: Suppose that there were 1000 students in a college, and that they could be classified as follows: A: Colorblind P(A) = 42/1000=.042 B: Male P(B) = 510/1000=.51 Male (B) Female Colorblind (A) 40 2 Not Colorblind 470 488 P(AB) = P(A) + P(B) – P(AB) = 42/ / /1000 = 512/1000 = .512 Check: P(AB) = ( )/1000 =.512

38 A Special Case When two events A and B are mutually exclusive, P(AB) = 0 and P(AB) = P(A) + P(B). Male Female Colorblind 40 2 Not Colorblind 470 488 A: male and colorblind P(A) = 40/1000 B: female and colorblind P(B) = 2/1000 A and B are mutually exclusive, so that P(AB) = P(A) + P(B) = 40/ /1000 = 42/1000=.042

39 Probabilities for Complements
We know that for any event A: P(A AC) = 0 Since either A or AC must occur, P(A AC) =1 so that P(A AC) = P(A)+ P(AC) = 1 A AC P(AC) = 1 – P(A)

40 Example A: male B: female
Select a student at random from the college. Define: Male Female Colorblind 40 2 Not Colorblind 470 488 A: male P(A) = 510/1000=.51 B: female P(B) = 1- P(A) = =.49 A and B are complementary, so that

41 Example P(A given B occurred) = ½ P(A given B did not occur) = ½ 1/4
Toss a fair coin twice. Define A: head on second toss B: head on first toss If B occurred, what is probability that A occurred? If B didn’t occur, what is probability that A occurred? P(A given B occurred) = ½ P(A given B did not occur) = ½ HH 1/4 HT P(A) does not change, whether B happens or not… A and B are independent! TH TT

42 Conditional Probabilities
The probability that A occurs, given that event B has occurred is called the conditional probability of A given B and is defined as “given”

43 Probabilities for Intersections
In the previous example, we found P(A  B) directly from the table. Sometimes this is impractical or impossible. The rule for calculating P(A  B) depends on the idea of independent and dependent events. Two events, A and B, are said to be independent if and only if the probability that event A occurs is not changed by occurrence of event B, or vice versa.

44 Example 1 Toss a fair coin twice. Define A: head on second toss
B: head on first toss A  B: head on both first and second P(A|B) = P(AB)/P(B)=(1/4)/(1/2)=1/2 P(A|not B) = 1/2 HH 1/4 HT TH P(A) does not change, whether B happens or not… A and B are independent! TT

45 Example 2 A bowl contains five M&Ms®, two red and three blue. Randomly select two candies, and define A: second candy is red. B: first candy is blue. P(A|B) =P(2nd red|1st blue)= 2/4 = 1/2 P(A|not B) = P(2nd red|1st red) = 1/4 m m m m m P(A) does change, depending on whether B happens or not… A and B are dependent!

46 Defining Independence
We can redefine independence in terms of conditional probabilities: Two events A and B are independent if and only if P(A|B) = P(A) or P(B|A) = P(B) Otherwise, they are dependent. Once you’ve decided whether or not two events are independent, you can use the following rule to calculate their intersection.

47 Multiplicative Rule for Intersections
For any two events, A and B, the probability that both A and B occur is P(A B) = P(A) P(B given that A occurred) = P(A)P(B|A) If the events A and B are independent, then the probability that both A and B occur is P(A B) = P(A) P(B)

48 Example 1 In a certain population, 10% of the people can be
classified as being high risk for a heart attack. Three people are randomly selected from this population. What is the probability that exactly one of the three is high risk? Define H: high risk N: not high risk P(exactly one high risk) = P(HNN) + P(NHN) + P(NNH) = P(H)P(N)P(N) + P(N)P(H)P(N) + P(N)P(N)P(H) = (.1)(.9)(.9) + (.9)(.1)(.9) + (.9)(.9)(.1)= 3(.1)(.9)2 = .243

49 P(high risk female) = P(HF)
Example 2 Suppose we have additional information in the previous example. We know that only 49% of the population are female. Also, of the female patients, 8% are high risk. A single person is selected at random. What is the probability that it is a high risk female? Define H: high risk F: female From the example, P(F) = .49 and P(H|F) = .08. Use the Multiplicative Rule: P(high risk female) = P(HF) = P(F)P(H|F) =.49(.08) = .0392

50 Example 3 m 2 green and 4 red M&Ms are in a box; Two of them are selected at random. A: First is green; B: Second is red. Find P(AB).

51 Method 1 m Sample Space: Choose 2 MMs out of 6. Order is recorded. (Size of sample space S) The order of the choice is important! Permutation Event AB: First green, second red First green 2  4 = 8 ways to choose first green and second red ( mn Rule) Second Red

52 Method 2 P(A) P(B|A) P(A B) = P(A)P(B|A) P(A B) = 2/6(4/5)=8/30
A: First is green; B: Second is red; AB: First green, second red P(A) P(B|A) 2/6 P(Second red | First green)=4/5 P(A B) = P(A)P(B|A) P(A B) = 2/6(4/5)=8/30

53 Example 4 Select a student at random from the college. Define: A: Male
B: Colorblind Find P(A), P(A|B) Are A and B independent? Male (A) Female Colorblind (B) 40 2 Not Colorblind 470 488 P(A) = 510/1000=.51 P(B) = 42/1000=.042 P(AB) = 40/1000=.040 P(A|B) = P(AB)/P(B)=.040/.042=.95 P(A|B) and P(A) are not equal. A, B are dependent

54 Probability Rules & Relations of Events
Complement Event Additive Rule Multiplicative Rule Conditional probability Mutually Exclusive Events Independent Events

55 Random Variables Examples:
A numerically valued variable x is a random variable if the value that it assumes, corresponding to the outcome of an experiment, is a chance or random event. Random variables can be discrete or continuous. Examples: x = SAT score for a randomly selected student x = number of people in a room at a randomly selected time of day x = weight of a fish drawn at random

56 Probability Distributions for Discrete Random Variables
Probability distribution of a discrete random variable x , is a graph, table or formula that gives possible values of x probability p(x) associated with each value x.

57 Example 1 Toss a fair coin once, Define x = number of heads.
Find distribution of x P(x = 0) = 1/2 P(x = 1) = 1/2 x 1 H 1/2 x p(x) 1/2 1 T

58 Probability Histogram for x
Example 2 Toss a fair coin three times and define x = number of heads. x 3 2 1 x p(x) 1/8 1 3/8 2 3 HHH 1/8 P(x = 0) = 1/8 P(x = 1) = 3/8 P(x = 2) = 3/8 P(x = 3) = 1/8 HHT HTH THH HTT Probability Histogram for x THT TTH TTT

59 Expected Value: 2(.5)+3(.5)=$2.5
Example 3 In a casino game, it has probability 0.5 of winning $2 and probability 0.5 of winning $3. x denotes the money won in a game. Find its probability distribution. How much should be paid for a game? x p(x) $2 0.5 $3 Expected Value: 2(.5)+3(.5)=$2.5

60 Expected Value of Random Variable
Let x be a discrete random variable with probability distribution p(x). Then the expected value, denoted by E(x), is defined by

61 Example Toss a fair coin 3 times and record x the number of heads. x
p(x) xp(x) 1/8 0(1/8)=0 1 3/8 1(3/8)=0.375 2 2(3/8)=0.75 3 3(1/8)=0.375 Total 1.5

62 Example x = -10 or 11,990 Define x = your gain. x p(x) -$10 7998/8000
In a lottery, 8,000 tickets are sold at $5 each. The prize is a $12,000 automobile and only one ticket will be the winner. If you purchased two tickets, your expected gain? x = -10 or 11,990 Define x = your gain. x p(x) -$10 7998/8000 $11,990 2/8000 μ = E(x) = Σ xp(x) = (-10) (7998/8000)+(11,990)(2/8000)= -$7

63 Mean & Standard Deviation
Let x be a discrete random variable with probability distribution p(x). Then the mean, variance and standard deviation of x are given as

64 Example Toss a fair coin 3 times and record x the number of heads.
Find variance by the definition formula. x p(x) (x-m)2p(x) 1/8 (0-1.5)2(1/8)=.28125 1 3/8 (1-1.5)2(3/8)=.09375 2 (2-1.5)2(3/8)=.09375 3 (3-1.5)2(1/8)=.28125 Total

65 Example Toss a fair coin 3 times and record x the number of heads.
Find the variance by the computational formula. x p(x) x2p(x) 1/8 02(1/8)=0 1 3/8 12(3/8)=0.375 2 22(3/8)=1.5 3 32(1/8)=1.125 Total

66 Example For a casino game, it has probability .2 of winning $5 and probability .8 of nothing. x is money won in a game. Calculate the variance of x. x p(x) (x-m)2p(x) 0.8 (0-1)2(0.8)=0.8 5 0.2 (5-1)2(0.2)=3.2 Total x p(x) x2p(x) 0.8 02(0.8)=0 5 .2 52(0.2)=5 Total 5

67 Key Concepts I. Experiments and the Sample Space 1. Experiments, events, mutually exclusive events, simple events 2. The sample space 3. Venn diagrams, tree diagrams, probability tables II. Probabilities 1. Relative frequency definition of probability 2. Properties of probabilities a. Each probability lies between 0 and 1. b. Sum of all simple-event probabilities equals P(A), the sum of the probabilities for all simple events in A

68 Key Concepts III. Counting Rules 1. mn Rule, extended mn Rule
2. Permutations: 3. Combinations: IV. Event Relations 1. Unions and intersections 2. Events a. Disjoint or mutually exclusive: b. Complementary:

69 Key Concepts 3. Conditional probability: 4. Independent events
5. Additive Rule of Probability: 6. Multiplicative Rule of Probability:

70 Key Concepts V. Discrete Random Variables and Probability Distributions 1. Random variables, discrete and continuous 2. Properties of probability distributions 3. Mean or expected value of a discrete random variable: 4. Variance and standard deviation of a discrete random variable:


Download ppt "Introduction to Probability and Statistics"

Similar presentations


Ads by Google