Download Mean and Variance of a Binomial Random Variable

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

Compartmental models in epidemiology wikipedia , lookup

Forensic epidemiology wikipedia , lookup

Transcript
POPULATIONS AND RANDOM VARIABLES
Often the things we sample from a population are actually measurements of some
characteristic. These measurements will naturally vary in some random way from
observation to observation.
This type of measurement, taken at random from a population, is called a
RANDOM VARIABLE, and we will use the symbol X to refer to it.
Example: Hospital records show that for patients undergoing a certain surgical
procedure, the length of stay in hospital was 2 days for 10% of the patients, 4 days
20% of the patients, 5 days 40% of the patients, and 6 days 30% of the patients.
Let X= the length of stay for a randomly selected patient. We can “model” the
population of these measurements by using the “PROBABILITY DISTRIBUTION”
of the random variable X. This is simply a table which gives the probability that the
value of X that we pick will be a certain number.
Probability Distribution of X
x
P(X=x) or p(x)
2
4
5
6
We obtain the following probabilities from this probability distribution.
1. P(X=4) =
2. P(X=2 or X=5)
3. P(X 4) =
4. P(X>3) =
5. P( 2 < X  6) =
6. P( X < 4 or X  5) =
(1)
Total
The Mean, Variance and Standard Deviation of a Random Variable X
MEAN: The population mean (or the mean of the distribution of X) is denoted by 
or x and is given by the formula
 =  xp(x)
Variance: The population variance ( or the variance of the distribution of X) is
denoted by 2 [ or x2 ] and is given by the formula:
2 =  (x - )2p(x) = x2p(x) - 2
The population standard deviation ( or the standard deviation of the distribution of
X) is denoted by  or x and is defined as
 = 2
Example: Consider the probability distribution of the random variable X in the
previous example.
x
p(x)
2
.1
4
.2
5
.4
6
.3
 = xp(x) =
=
surgical
[the mean (average) length of stay for patients undergoing this
procedure]
2 =  (x -  )2p(x) =
=
=
(2)
A Counting Rule
Definition: n! ( read as “n factorial”) means the following:
n! = n(n-1)(n-2)...(3)(2)(1)
Note: By definition 0! = 1.
Example: (a) 3! =
(b) 5! =
An Important Formula: Let Cnx ( read “ n choose x”) denote the number of ways of
obtaining “ x heads in n tosses” of a coin. Then
Cnx = (n!/x!(n-x)!)
The number Cnx is called a binomial coefficient.
Example: How many ways are there to obtain
(a) 2 heads in 3 tosses of a coin?
(b) 0 heads in 3 tosses of a coin?
(c) 12 heads in 15 tosses of a coin?
Note: The formula used above is merely a short hand way of calculating something
that would otherwise require us to draw a tree diagram.
For example, the answer to (a) could have been obtained as follows:
(3)
THE BINOMIAL EXPERIMENT
Conditions for a Binomial Experiment
1. n identical trials are performed,
where n is determined prior to
the experiment
A Coin Tossing Experiment
1. A fair coin is tossed 10 times
exactly the same way each time.
So 10 identical trials are
performed.
2. The trials are independent; so the
outcome of any particular toss
does not influence the outcome of
any other toss.
3. Each trial has two possible
outcomes, heads (success) and
tails (failure)
4. At each trial:
P(success) = p =.5
P(failure) = q = .5,
since the coin is fair.
The Binomial Random Variable is
X = the total number of heads in the
10 tosses.
2. The trials are independent; so the
outcome of any particular trial
does not influence the outcome of
any other trial.
3. Each trial has two possible
outcomes which we call “success”
and “failure”.
4. The probability of “success” is
same for each trial and is denoted
by “p”. Thus at each trial:
P(success) = p
P(failure) = 1 –p =q.
The Binomial Random Variable is
X= the total number of successes in
the n trials.
Example of Binomial Experiment: A manufacturer supplies a certain component for
automobile companies. 2% of the components produced are defective. A srs of 30
components is examined. Of interest is the number of defective components in the
sample.
1. n =
, identical trials are performed.
A trial consists of ____________________________________________________
2. The trails are independent.
3. Each trial has two possible outcomes,
Success: _______________________________________________
Failure:________________________________________________
4. At each trial : P(success) =p =
P(failure) = q =
The Binomial Random Variable is :
X=
(4)
Note: In general If X is a Binomial(n,p) ;then,
P(X=x) = p(x) = Cnxpxqn-x; x = 0,1,2,…,n; q = 1-p.
Where, Cnx = n!/x!(n-x)!
Example: A biased coin which has P(heads) = p =.7 and p(tails) = q = .3 is tossed 3
times. The coin is tossed in such a way that the outcomes on each toss are
independent. We obtain the probability of 0,1,2 and 3 heads using the above
formula:
(i)
P(X=0) =
(ii)
P(X=1) =
(iii)
P( X=2) =
(iv)
P( X=3) =
(5)
Probability Histogram for a Binomial Distribution:
Consider our binomial n=3, p=.7 random variable X above.
x
p(x)
0
.027
1
.189
2
.441
3
.343
Questions:
1. What is the shape of this histogram?______________________
2. What do you think the shape of this histogram would be if
(a) p < .50?__________________________________
(b) p =.50?____________________________________
(6)
Mean and Variance of a Binomial Random Variable
Again consider our binomial n=3, p=.7 random variable X above.
Using the usual formula for  and 2 , we obtain
 =  xp(x) =
2 =  (x -  )2 p(x)
=
=
Fact: It can be shown that for a Binomial random variable X, the mean , the
variance 2 and the standard deviation  can be calculated using the following
formulas:
 = np,
2 = npq, and  =  npq
Thus in the example above:
 = np = 3(.7) = 2.1
2 = npq =
=
(7)
Example: In a multiple choice test, there are 5 questions each with three possible
answers. For each question a student chooses an answer at random. Find the
probability that she gets (a) exactly 3 correct answers (b) three or fewer correct.
Let X = the number of correct guesses out of 5.
X is binomial , n = _____________, p = _______________
P(X=x) = p(x) =
(a) P(X=3) =
(b) P(X3) =
(8)
Example: A variety of seed has a 40% chance of germinating. Ten seeds are planted.
You are interested in X = the number of seeds out of ten that germinates. Then X is
_______________, n = ____________, p = ______________
(a) find the mean (expected) number of seeds that will germinate.
(b) the variance and standard deviation.
(c) The probability that exactly 6 seeds germinate.
(d) The probability that fewer than 6 seeds germinate.
(9)
(e) The probability at most six seeds germinate.
(f) The probability at least 6 seeds germinate.
(g) The probability that more than 6 seeds germinate.
(10)