The binomial distribution

Download Report

Transcript The binomial distribution

The binomial
distribution
(Session 06)
SADC Course in Statistics
Learning Objectives
At the end of this session you will be able to:
• describe the binomial probability
distribution including the underlying
assumptions
• calculate binomial probabilities for simple
situations
• apply the binomial model in appropriate
practical situations
To put your footer here go to View > Header and Footer
2
Study of child-headed households
• One devastating effect of the HIV and AIDS
pandemic is the emergence of child-headed
households, i.e. ones where both parents have
died and the children are left to fend for
themselves.
• Suppose it is of interest to study in greater
detail those households that are child-headed.
• Statistical techniques that may be employed
require initially, a knowledge of the
distributional pattern of the random variable X
corresponding to the number of child-headed
households.
To put your footer here go to View > Header and Footer
3
A probability distribution for X
• Interest is on the distribution of
X = number of child-headed households
• Under certain assumptions, X has a
binomial distribution.
• To introduce this distribution, we first
deal with a simpler (but related)
distribution
To put your footer here go to View > Header and Footer
4
The Bernoulli Distribution
The simplest probability distribution is one
describing the behaviour of a dichotomous
(binary) random variable, i.e. one with two
possible outcomes; (Success, Failure), (Yes,
No), (Female, Male), etc.
Probability
Success
Values of random
variable
1
failure
0
1-p
Total
1
Outcome
To put your footer here go to View > Header and Footer
p
5
Background
In general, we have a sequence of n trials,
each with just two possible outcomes.
e.g. visiting n households in turn and
recording whether it is child-headed.
Call one outcome a “success”, the other a
“failure”. Let probability (of a success) = p.
The word success is a generic term used to
represent the outcome of interest, e.g. if a
sampled household is child-headed we call it
a “success” because that is the outcome of
interest.
To put your footer here go to View > Header and Footer
6
Basics and terminology
Let X be the number of successes in n trials.
X is said to have a binomial distribution if:
• The probability of success p is the same
for each trial.
• The trials have independent outcomes.
In the context of our example, X=number of
child-headed HHs from n HHs sampled.
p=probability of a HH being child-headed.
Under what conditions would X be binomial?
To put your footer here go to View > Header and Footer
7
Binomial Probability Distribution
The probability of finding k successes out
of n trials is given by
n!
P( X  k ) 
p k (1  p) nk ,
k!(n  k )!
k  0,1,, n
Here n! = n(n-1)(n-2)……. (3) (2) (1); 0!=1.
Thus, for example, 4! = 4 x 3 x 2 x 1 = 24.
Exercise: If p=0.2 and n=10, confirm that
10 !
3
10 3
P( X  3 ) 
0.2 ( 1  0.2 )  0.2
3!( 10  3 )!
To put your footer here go to View > Header and Footer
8
Binomial Probability Distribution
In computing binomial probabilities, the value
of p is often unknown.
It is then estimated by the proportion of
successes in the sample.
observed no.of
 successes( sayr )inntrials
i.e. p̂
totalsamplesize,n
r
i.e. p̂
n
Following graphs show binomial probabilities
for n=10 and differing values of p.
To put your footer here go to View > Header and Footer
9
Example 1: Left-handedness
Suppose the
probability of a
person being lefthanded is p=0.2.
Binomial distribution with p = 0.2
0.35
Probability
0.30
0.25
Let X be number
left-handed
persons in a
group of 10.
0.20
0.15
0.10
0.05
0.00
0
1
2
3
4
5
6
7
8
9
10
X
There are 11 possible outcomes.
Graph shows P(X=2)=0.3,
P(X=3)=0.2, P(X>6) almost=0.
Graph shows
probability of 0,
1, 2, … lefthanded persons
To put your footer here go to View > Header and Footer
10
Example 2: Tossing a coin
A coin is tossed.
The probability of
getting a head is
p=0.5.
Binomial distribution with p = 0.5
0.30
Probability
0.25
0.20
Let X be number
heads in 10
tosses of the coin.
0.15
0.10
0.05
0.00
0
1
2
3
4
5
6
7
8
9
10
X
The distribution is symmetrical.
We find P(X=2)=P(X=8)=0.044,
P(X=3)=P(X=7)=0.12, etc.
Graph shows
probability of
getting 0, 1, 2, …
heads.
To put your footer here go to View > Header and Footer
11
Example 3: Selecting a rural village
Ratio of rural
villages to urban
villages is 4:1.
Binomial distribution with p = 0.8
0.35
Probability
0.30
0.25
0.20
0.15
0.10
0.05
0.00
0
1
2
3
4
5
6
7
8
X
The distribution is now
concentrated to the right.
Here P(X<4) is almost zero.
9
10
Suppose 10
villages are
selected at
random. Let X be
number of rural
villages selected.
Graph shows
probability of
getting 0, 1, 2, …
rural villages.
To put your footer here go to View > Header and Footer
12
Properties of Binomial Distribution
The mean (average) of the binomial distribution
with parameters n and p = np.
e.g. In a population of size 1000, suppose the
probability of selecting a child-headed HH is
p=0.03. Then the mean number of child-headed
HHs is 1000x0.03 = 30.
Recall that the mean = expected value of X. Thus
n
n!
  E( X )   x
p x (1  p ) n  x  np.
x!(n  x)!
x 0
Note: Since the binomial is a probability distribution,
n
n!
x
n x
p (1  p)  1.

x  0 x!( n  x )!
To put your footer here go to View > Header and Footer
13
Further Properties:
The standard deviation of the binomial
distribution is np(1  p)
For n=1000, p=0.2 the standard deviation is
therefore np(1  p) =[1000*0.2*0.8]½ = 12.65
The theoretical derivation is given below.
n
n!
E( X )   x
p x ( 1  p )n  x
x!( n  x )!
x 0
2
2
Above can be shown to be np( 1  p )  n 2 p 2 .
Var( X )   2  E( X 2 )   2  np( 1  p ).
To put your footer here go to View > Header and Footer
14
Practical work follows to
ensure learning objectives
are achieved…
To put your footer here go to View > Header and Footer
15