Download Conditional Probability

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Statistics wikipedia , lookup

History of statistics wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Probability wikipedia , lookup

Probability interpretations wikipedia , lookup

Transcript
Bernoulli Experiment:
When we look at an experiment we can usually separate it into two parts – two types of outcomes.
If it is possible to do so, we will define the two outcomes( two events) as ; a success (s) and a failure (f)
( We may still need to be able to look at a sample space with uniform probability )
A Bernoulli experiment has two outcomes labeled
s for ______________ and f for _____________
We let P(s) = p and P(f) = q.  property: p + q = _________
examples:
1) A single- sided- loaded die is rolled and you are interested in knowing if the outcome is a four.
Bernoulli Experiment: _________________________
success= ____________
p = ______
2) A fair coin is tossed. You are wanting the outcome to be a head.
Experiment: _________________________
success= ____________
p = ______
3) A card is chosen from a standard deck . You observe to see if a diamond comes up or not.
Experiment: _________________________
success= ____________
p = ______
4) A patient checks into the emergency room – and is observed for serious injuries. ( serious or not )
Experiment: _________________________
success= ____________
p = ______
5) A person is driving down a street that has five traffic lights. A light is green three minutes and red for one
minute. What is the probability that the person will
a) get only one red light ?
b) at least one red light ?
Is this a Bernoulli Experiment ?
51
6) Six different races are being held at the race track (horses). In each race there are ten horses and each
horse is equally likely to win (random). What is the probability that a person picking the horse at random
will pick
a) all winners ? _______
b) exactly four winning horses ? _________
Is this a Bernoulli Experiment ?
Let p be the success probability and q be failure probability of a Bernoulli experiment
If we repeat the Bernoulli experiment n times – the resulting experiment is called a
_____________________
The values of this experiment represent the number of successes.
We usually use X =x to represent x successes.
X can have any of the values → 0, 1, 2, 3, ... , n.
The values of X will usually have distinct probabilities (not always – but usually)
Notice:
the n Bernoulli trials must be independent of each other ( coin tosses, rolls of a die, … ) - probability of the given event
does not change.
Binomial Experiment
A binomial experiment is a sequence of independent Bernoulli trials. If we let x represent the number of success in n
Bernoulli trials, then
0  x  n , where n is a whole number
We can find the probability of x success by the following formula;
C( n, x ) px qn- x → It is easy enough to see where px qn-x come from but what about C(n,x) ?
ex. A coin is tossed five times. What is the probability of getting at least four heads ? ____________________________
52
ex. Consider 3-child families. What is the probability that exactly 2 are male children ? ________________________
ex. A die is rolled ten times. What is the probability that you will roll four sixes ? ______________________________
ex. A card is selected at random from a standard deck of cards that consists only of face cards and aces. The
card is then replaced. What is the probability that in 10 draws
a) you will draw six aces ? _________
b) you will draw six face cards ? ______
ex. Last year’s records show that out of 500 children examined by a doctor – 12 were not up to date on
their vaccination records. If ten new children are chosen at random from a group similar to last years, what is the
probability that two of them will not be up to date. To make this work, we will assume that each child has the same
probability as the others.
ex. A loaded coin with P(heads) = 2/5 is tossed four times. Find the following probabilities.
a) no tails
_____________________
b) exactly 2 heads _________________
c) at least one head __________________
53
ex. A six-sided die has the following probability model;
The die is rolled five times. What is the probability that
a) none of the rolls land in a six ? ______________
P ( x ) = x / 21 , where x represents its face 1, 2,3, 4, 5, 6
b) exactly four of the rolls are sixes ? ___________
c) at least one of the rolls is a six ? _____________
ex. A standard deck of cards is shuffled and a card is chosen at random, recorded and replaced.
Suppose four cards are selected in this manner .
What is the probability that
a) all are aces ?
____________
b) all are diamonds ? _________________
c) at least one is red ? ________________
Before we leave this discussion see if you can find the difference in each of the following examples.
1. Four cards are drawn and placed in your hand. What is the probability that all four are aces ?
2. A card is drawn, the result is recorded and the card is then replaced. What is the probability that in four draws you will get
four aces ?
3. An individual is to be selected to lead the group for the entire week. If there are four weeks in the month and a member can
only serve once, then what is the probability that from a group of 20 men and 30 women no woman will be selected during
the month ?
4. From a group of 20 men and 30 women a member is to be selected to be a chairperson of each of four different committees.
An individual can be in more than one committee. What is the probability that all different chairpersons will be men ?
54
Arithmetic Mean - Mode – Median
Consider the cases in which the entire population is known
Sets like: all of your grades → average, all students in class today → average # of siblings in family
We consider cases that do not include the entire population later in the notes.
ex.
Find the average wt. of a human male. __________________________
ex. Find the average ht. of a female in the USA. _____________________
ex. Find the average wage/month of a person in TX. ___________________
ex.
A student has the following grades: they are all worth the same
70, 80, 60, 90, 80 , 100, 75, 85
Mode: occurs with greatest frequency ( more of them )
this value must be one of the given values
Arithmetic mean: use x bar, x , average of the values →
x this value may or may not be one of the values.
Median: write the values in order of size , median will represent either the middle value if such exists or the
average of the two middle values if no single middle value occurs.
Range:
ex. Consider the amount of money in coins that each of 10 people have in their pockets. (in terms of cents )
25, 0, 0, 125, 200, 50, 25, 50, 100, 50 Mode= _________ Median = __________
x = _________
ex. Find the mode, mean, and median of the set { 2, 2, 4, 6, 4, 0, 8, 6, 4}
55
Arithmetic mean
We use the symbol x to represent the arithmetic mean (mean) of a set of numbers.
Average:
x = (x1 + x2 + x3 + x4 + ... ) / n, where n represents the total number of values being considered.
Sometimes we write a group of number in terms of their frequency:
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2 , 2, 2, 2, 3, 3, 4, 0
1 with frequency 10
2 with freq. 5
3with freq. 2 ==>
4 with freq. 1
0 with freq. 1
We can find the mean.
We can find the mean ____________
the median _____________
and the mode ________
Def. The ________________ of a set of values written in increasing(or decreasing ) order is the middle value – or the average
of the two middle values.
Def. The _____________ of a set of values is the value with the greatest frequency.
Although these values may be useful in looking at data – they may not be sufficient or provide an accurate enough picture.
We call these measures; mode, mean, median → measures of central
These types of measurements are part of what we call descriptive statistics.
tendencies “averages”
We can also talk about the range of the data.
Consider this example from your author.
The average height of a basketball team is 6 feet. Does it describe the team ?
a) ht. of the players: 5, 5, 6, 7, 7
b) five 6 ft. players
The median, mode would help to describe the data. So would the range.
Range: The difference between the largest and smallest value.
In our two examples above: 7-5 = 2 while the second example: 6-6=0
56
ex. Suppose the following data represents the salary of the top 5 executives in each of two companies.
A: 100K, 50 K, 25 K, 25 K, 50 K
B: 25 K, 50 K, 50 K, 50 K, 75 K
What is the mean ? _____________
mean ? __________
What is the median ? _____________
median ? ____________
Mode ? _____________
mode ? _____________
Range ? ____________
Range ? ____________
Which one is best ? Why ?
ex. a die is rolled ten times with outcomes: 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
calculate the mode: _____
median: _______
mean: ________
variation from the mean: ____
ex. Before we discuss the next topic ( Variance ) - What would be the average of 10 rolls of a die ?
x we define the deviation from the mean of each value by
for x3: (x3 - x )
Def. Deviation from the mean: Given x1, x2, x3 with mean
for x1: (x1 -
x)
for x2: (x2 -
x)
Variation (deviation) from the mean. ( assume that we are looking at the entire population)
ex. Data: 1, 0, 2, 1 ==>
Find the mean → _____________
Average Deviation (Variation) : _________
57
Average Squared Variation From the Mean (population variance )
ex.
1, 1, 1, 1, 1, 1, 1, 1
ex. 1, 0, - 1
To get something more meaningful we might discuss the standard deviation. This is the square root of the variance.
s
2
 ( x  x)

 ( x  x)
2
2
n
n
average-squared deviation
(variance)
square root of the squared-deviation
(standard deviation)
Population –vs- Sample
While it is more accurate to have the entire population present to evaluate statistics – it is usually
not reasonable. In that case we take a sample (random) of the entire population.
We can still describe mean, mode, median as before. But we use a slightly different formula to
discuss the variance and the standard deviation.
ex. A random sample of students was taken. They are asked the number of hours of sleep they
average a night.
Ten students responded - 10, 5, 6, 7, 6, 7, 6, 8, 6, 4
Find the variance and the standard deviation of the data (sample).
Formulas:
s
2
 ( x  x)

n 1
2
s=
 ( x  x)
2
n 1
58
Random Variables
Def.
A ____________ _____________ is a rule that assigns a numerical value to each outcome of an experiment.
Now every sample space that we look at is written or can be written in terms of numerical values.
ex.1 A loaded coin is tossed three times and the sequence is recorded. What is a good sample space and how could we
assign a numerical value to it ?
Let S =
Let the r.v. X represent :
ex2. A pair of dice is rolled four separate times. Suppose you are interested in seeing a double. Describe a sample space
to which each outcome can be assigned a numerical value.
Let S =
Let the r.v. Y represent:
ex3 .
A card is picked at random from a well-shuffled deck of cards. The card’s value is recorded and replaced. The deck
is shuffled and again. This pattern continues until an ace comes up. Describe the sample space so that a numerical
value can be assigned.
Let S =
ex4.
A class consists of 45 students. Describe a sample space that tells the number of days a student has been absent
during the lass 18 days of class.
Let S =
Let the r.v. X represent:
59
ex5. Record the exact amount of time that one of the forty-five students can hold their breath during the 50 minute class.
Describe this experiment in such a way that you can assign a value to all the outcomes.
Example:
A study is taken to determine the amount of hours spent driving to a student’s destination during spring break.
The group consists of 200.
a) How would you determine the arithmetic mean, the variance ?
b)
Arithmetic mean:
c) sample variance:
d) standard deviation:
ex. a company is trying to determine the accuracy of its pill counting machine –
A sample of five bottles is taken with the following count; 40, 50, 50, 52, 53
Find the sample standard deviation.
ex.
A graduate class consists of 5 students. Their grades on the first exam were 90, 80, 70, 90, and 80.
Calculate the arithmetic mean → ________
The variance → _________ and the standard deviation → _____
60
ex. A classroom with 30 students is sampled to determine the number of siblings in the family.
Here are the results → 7 had no sibling, 18 had 1 sibling, 7 had two sibling.
Determine the average number of children in a family and the population variance of this data(number of children
in the family.
We have seen three different kinds of ______________ ___________________.
They are
1) __________________ _______________ _____________
2) _________________ _______________ ______________
3) ____________________ _______________
Since a sample space has a probability distribution and the values of any of these types of ____________ come from a sample
space, then you would expect
1) the probability of any value of the random variable to be between _______________________
2) the sum of all the probabilities (of the values of the r.v. ) to equal __________
ex1. Toss a coin three times and let the r.v. X represent the number of heads. X = _________________
Probability distribution of X
If X = 0  no heads in your three tosses, _______
X = 2  _______________________
If X = 1, then  __________________
X = 3  ______________________
X = x P(X = x )
---------------------------------------------------------------------------------------------------
61
ex1. a die is rolled three times. Let the r.v. X represent the number of sixes. X = _____________________
Find the probability distribution
X = x P(X = x )
--------------------------------------------------------------------------------------------------We can graph the probability distribution of a r.v. by using one of several graphs. One of the more useful ones is a probability
density histogram: consists of bars of width 1 unit and height equal to the probability of the value x.
ex. Suppose we have the r.v. X with the following probability distribution.
X=x
P( X = x )
-2
1
2
4
0.1
0.2
0.4
0.3
62
ex. Consider the following experiment: An employer calls three different workers to see if they will work during the weekend.
Assuming they will provide an answer based on a totally random feeling where a “NO “ answer is three times more likely
than a “yes” answer. Find the probability distribution of this r.v.
Let the r.v. Y represent ? _________________________________________________
Y=x
0
1
2
3
P( Y = y )
The histogram ------------>
ex. We can ask probability questions about either of the r.v. above.
a) what is P( X > 0 ) ? _____________
b) P( Y < 3 ) ? _______________
c) P ( X = 0 ) = ________________
d) P( Y = 2.5 ) = _____________
We can extend these ideas : mean, variance , standard deviation to random variables.
First:
Consider a coin that is tossed n times –
head
tails
n=10
4
6
n = 100
42
58
n = 1000
425
575
(head )
relative
frequency
Again -- if n --> , rel. freq.
(tail )
relative frequency
As n is allowed to
increase to infinity
f/n -> p, some probability p.
63
ex. Suppose an experiment is assigned a r.v. X with only three outcomes, say 1, 2, 4
After n trials of the experiment we have 1 occurs with frequency f1, 2 with freq. f2, and 4 with freq. f4
What is the arithmetic mean ?
What if n is allowed to go to infinity ? ___________________
Note: when n goes to infinity we call it the expected value of the r.v. X.(instead of the arithmetic mean )
Formula: E(X) = p1x1 + p2x2 + p3x3
ex. A loaded coin is tossed twice - (a head is twice as likely to occur as a tails). The r.v. Y represents the number of heads
that come up. Find the expected value of Y.
ex. A student takes a 4 problem multiple choice quiz ( three choices per question ). Let the r.v. Z represent the number of
correct answers. Find the expected value of Z.
Z=z P(Z = z )
=======================
0
--------------------------------------1
--------------------------------------2
--------------------------------------3
-----------------------------------------4
64
Note: Expected value – can be thought of as the long term average
In the case of a Binomial Experiment, the expected value is a little bit easier to find.
Ex(X ) = np if X is a Binomial r.v.
ex. Suppose a die is rolled 12 times. What is the expected value of Y , if Y represents the number of sixes in the 12 rolls ?
ex. The probability of a tire being defective from company A is 0.01. A sample of 100 tires is sampled. Let the r.v. Z
represent the number of defective tires. Find the expected value of Z.
Not all r.v. are Binomial.
x=x
P(X = x )
=============
-2
----------------------0
---------------------2
---------------------
Y=y P (Y=y )
=============
1/2
------------------------2
------------------------3
--------------------------
Formula for the variance of a r.v.
Go back to our example of x1, x2, x3 with probabilities p1, p2, p3 .
65
ex.
8, 10, 12  arithmetic mean x = 10
Variation from the mean 
( 8 – 10) = -2
( 10 – 10 ) = 0
(12 – 10 ) = 2
Instead of calculating the average of the numbers, we can find an average of the variations  but _________
Instead let’s look at the average squared variations ( Asv ): Asv = ____________________
We squared the variations, let’s “unsquare” the variations: let’s call these average squared deviations, A sd.
ex. Find the average squared deviation of the data;
2 with frequency 10
5 with frequency 30
7 with frequency 40
If we replace relative frequency with probabilities then the average squared deviation is replaced with what we call
the variance .
Variance: long term average of the average squared variations
standard deviation: square root of the variance
In general if the r.v. X can have only three values, say x1, x2, and x3, and each one occurs with probability p1, p2, and p3,
respectively then
We define the variance of a r.v. X by
Var(X ) = p1(x1 –  )2 + p2 ( x2 -  )2 + p3 ( x3 -  )2
Notice: p1 + p2 + p3 = ____________
x1p1 + x2p2 + x3p3 = ___________
We can write the formula a little bit different.
Var(X ) = _________(sigma) = ______________________________________________
66
Example.
Find the variance of X in the following example.
X=x
P(X = x )
==================
-2
-----------------------------1
-----------------------------4
-----------------------------
67
Expected Value examples:
1) A soft drink company takes a samples of their 12 oz cans to determine the actual amount of soft drink in the can. The
amount is rounded to the nearest oz.
A can has a likelihood of 4/7 of having 12 oz
A can has a likelihood of 1/7 of having 13 oz
A can has a likelihood of 2/7 of having 11 oz
For simplicity sakes – let’s assume no other amount is possible.
Find the expected amount of liquid on a can that is selected at random.
r.v. X( X represents the amount of soft drink in the can ) ?
What is the variance of the
2) A $50,000 life insurance policy is sold to an individual for $15/month on a 1-year contract. The probability a person of
his classification will die within the next year is 0.001. What the expected value of such a policy with respect to the
company that is selling the policy ?
3) A game is played as follows: A pair of dice is rolled. If the sum is > 10 or less than 4 you get your $1 bet back and win
an additional five dollars. Anything else, you lose your $1 bet.
Find the expected value of this game. Is this a fair game ? Why or Why not ?
68
Other Distributions: we talked about binomial experiments
Normal Distributions
Normal Curves - - mean, standard deviation , inflection points, area under a curve,
_______________________________________
If the normal curve has  = 0 and a variance = standard deviation = 1, we call it a standard normal curve.
We use tables to find area under a curve. Notice that half of the area is to the right of the mean, half to the left (symmetric ).
We have a function that expresses the curve and there are ways of finding the area under a curve.( see page ____ )
ex. f(x) = 4 . Find the area under the curve between x = –2 and 2
ex. f(x) = 2x. Find the area under the curve between x = 0 and 4
ex. f(x) = x2. Find the area under the curve between x = -1 and x = 2
69
It is not as easy to find the area under a normal curve.
Consider the following functions: (see page 610)
f(x) =
1
 2
( x )2
e
2 2
This is the function that we would try to work with when finding the area under a
a normal curve. You can see the problem that we would have.
A table is constructed for a standard normal curve. We use the following formula and this table to find areas under a normal
curve.
x - 
z = -----------
Table
z
0
1
2
3
4 ….
9
------------------------------------------------------------------------------------------------------------------------:
:
:
2.1
ex. Find the area to the left of - 1 under a standard normal curve.
ex. Find the area to the left of 16 under a normal curve with  = 20 and variance = 16.
70
ex. Find the area to the right of 190 under a normal curve with  = 200 and variance = 81.
ex. Find the area between 20 and 30 under a normal curve with mean = 28 and variance = 25
Correlation between normal curves and a binomial r.v. X:
If n is large enough , say n > 26, we can use a normal curve to estimate the probability that X = x
ex. Let X be a binomial r.v. with n = 100 and p = 0.2. What is the probability that
ex. Recent studies have shown that newly planted pecan trees have a 40 % chance of surviving more than 5 years.
What is the probability that
a) exactly 50 trees out of 100 will survive more than five
b) more that 50 trees will survive more than 5 years ?
71
Examples:
1. Let X represent a binomial r.v. with n = 100 and p = 1/10.
We can find
a) the probability distribution:
b) the expected value and
c) the standard deviation.
2.
Let Y represent a r.v. with the following probability distribution
3.
Consider a game:
A bag consists of 100 marbles; 1 black, 9 red, and rest white. It costs you $1 to play. If you draw
a) a black (the) marble: you win $25 ( your dollar back plus $25)
b) a red marble: you win $5,
c) a white marble: you lose your bet
What is the expected vale of this game? – what is the variance ?
72
4.
Normal distributions.
a) The area inside the curve ( under) is equal to what value ? _________
b) the area to the left of the mean is equal to what value ? _________
c) the inflection points are located at ? _______________
d) the highest point of the curve is at the ? ____________
5. A standard normal curve is a curve in which _____________________________ and _____________________
6.
Find the area to the right -2 under a normal curve with mean µ = 0 and variance =2 = 1
7.
Find the area between 8 and 18 under a normal curve with µ = 15 and 2 = 16
8.
A person has a 0.01 probability of making a typing mistake with each stroke. If the person strikes the keyboard, 2000
times, then
a) What is the probability that he will make 20 mistakes ? ____________
b) at least 25 mistakes ? _______________
9. During a recent survey at MUS it was discovered that 1/50 students that enrolled in a math class enjoyed it enough to sign
up for an additional class that was not required for their degree plan.
If 2400 students are signed up during the current semester, what is the probability that
a) exactly 50 will take the additional class ?
b) at least 40 students will take an additional class ?
73
Examples of Binomial Experiments with solutions by normal curve ( approximations)
1. A company has a patch that is advertised as helping a person quit smoking. The company’s brochure indicates that 80 % of
those tested quit smoking ( the probability that an individual will quit smoking is 80 %)
A group of 40 smokers will independently test this device.
What is the probability that
a) exactly 32 of them will quit smoking ? _________________
b) Give me an estimate of the probability that more than 32 will quit smoking ? ( A rough estimate ) _______________
c) How many do you expect to quit ? ______________
d) What is the probability that more than 33 will quit ?
2.
Use a normal curve to estimate the answer. _______________
Recent studies have shown that a marriage will end in divorce 54 % of the time ( a couple that gets married has 54 % of
getting divorced ). A random sample of 100 marriages is taken.
a) How many of these do you expect to end in divorce ? ______________
b) What is the probability that 54 will end in divorce ? ______________
c) What is the probability that more than less than 60 will end in divorce ? ______________
74
Name _____________________ Math 1312 – Qz #4, September 11, 2001
1. If two events A and B are disjoint, then A  B = ___________
2. Complete the formula for any two sets A and B. n ( A u B ) = __________________________________
3. If S = { s1, s2, s3, s4 }, then list all of the elementary events
E1 = { s1 } , ______________________________________________
Find P (  ) = ________________
4. Find P ( S ) = ____________
5. For any event E,
____________  P( E )  __________
6. Suppose that S has uniform probability with S = { s1, s2, s3, …., s 20 }, E = { s8 }, and F { s1, s2, s3 }.
Find
a) P ( E ) = _______________
P ( E U F ) = ______________
c) P ( F / ) = ____________
7. If there is a 20 % chance of rain falling today, what is the probability that no rain will fall today ? ___________
8. Given the following table . Find each of the following probability
red
not red
woman
200
120
man
40
140
A person is selected at random. What is the
a) probability person selected is a woman wearing red ? ____________________
b) probability that the person selected is wearing red and is a woman ? ____________________
c) probability that the person is a woman if she is known to be wearing red ? _____________
75
Name ___________________________________ Math 1312 - QZ #4 - September 11, 2001
1. Properties of Probability
Fill in the blank
a) Another word for mutually exclusive events is __________________________________
b) The probability of any event E is always bounded by __________  P(E)  __________
c) P(A ) + P ( A / ) = ______________
d) P( elementary events ) = __________
2. Of 100 students 24 can speak French, 18 can speak German , and 8 can speak both French and German. If a student is
picked at random, what is the probability that he or she can speak French or German ?
3. 200 cars enter an intersection. 40 turn left, 100 go straight, and the remaining cars turn right. One of these cars is chosen
at random. What is the probability that the car will turn ?
4. A loaded four sided ( a _______________ ) die is rolled. The following probability distribution describes the outcomes of
the die
P( s1) = 1/10, P(s2) = 2/10, P(s3) = 3/ 10, P(s4) = 4/10
What is the probability that an even number comes up ? ______________
What is the probability that an even or prime number comes up ? ________
5. A card is drawn at random from a standard deck. What is the probability that the card selected is either a king or a
diamond ? _____________
76
Additional Examples:
1.
On the first Monday of every month a drawing is held to see who wins a $ 100 gift certificate. The contest is only open
to the 18 men and 2 women in a department. Sixteen of the men and 1 of the women are married. The others are known
to be single.
a) IF the selection is done at random, what is the probability that the single woman wins all twelve times ?
b) Once a person wins, he can not win again – what is the probability that all twelve winners were male-married ?
2.
A card is selected at random from a standard deck. The card is then replaced. A second card is selected. The process is
repeated until three cards have been drawn and recorded. What is the probability that all three were aces.
What is the probability that in a normal three card draw ( three-card hand ) all of the cards are aces ?
3.
A child uses the blocks labeled as C, A, T  if he arranges them in order, what is the probability that he will spell CAT.
An adult takes the same blocks – selects one at random writes down the letter, selects at random again from the same
group
After three tries, what is the probability that the adult spells CAT
77