the binomial distribution
DESCRIPTION
Introduction to Bernoulli Trials, Binomial Distribution and Binomial Test in SPSSTRANSCRIPT
The Binomial Distribution. Max Chipulu, University of Southampton 2009
1
The Binomial Distribution: The Binomial Distribution: ObjectivesObjectives
• To Introduce the notion of a ‘Bernoulli Trial’
• To introduce the Binomial Probability Distribution as the situation when a finite number of Bernoulli Trials is conducted
• To recognise problems suitable for Binomial Probability modeling and calculate Binomial probabilities using a formula
• To understand and apply the Binomial Distribution in hypothesis testing: Binomial Test
The Binomial Distribution. Max Chipulu, University of Southampton 2009
2
Try thisTry this
Have you got a coin? Have you got a coin?
Toss it six times in a roll, each time counting Toss it six times in a roll, each time counting
the number of times the result, the number of times the result, ‘‘headsheads’’ is is
observed.observed.
The Binomial Distribution. Max Chipulu, University of Southampton 2009
3
Observed ProbabilityObserved Probability
Before a coin is tossed six times in a roll, Before a coin is tossed six times in a roll,
what is the probability that in total there will what is the probability that in total there will
be two be two ‘‘headsheads’’ out of six?out of six?
The Binomial Distribution. Max Chipulu, University of Southampton 2009
4
A BERNOULLI TRIALA BERNOULLI TRIAL
Tossing a coin is Bernoulli trial. A Bernoulli trial is a Tossing a coin is Bernoulli trial. A Bernoulli trial is a
randomrandom experiment that has only two, mutually experiment that has only two, mutually
exclusive outcomes. exclusive outcomes.
Thus, when a coin is tossed, the two possible outcomes Thus, when a coin is tossed, the two possible outcomes
are revealing a are revealing a ‘‘headsheads’’ or revealing a or revealing a ‘‘tailstails’’. We want to . We want to
see how many see how many ‘‘headsheads’’ are revealed. So revealing a are revealed. So revealing a
‘‘headsheads’’ is a is a ‘‘successsuccess’’. Revealing a . Revealing a ‘‘tailstails’’ is a is a ‘‘failurefailure’’..
The Binomial Distribution. Max Chipulu, University of Southampton 2009
5
Properties of a BERNOULLI TRIALProperties of a BERNOULLI TRIAL
Since youSince you’’re tossing the same coin in all six re tossing the same coin in all six
BernouliBernouli trials, the probability of a trials, the probability of a ‘‘headsheads’’ or a or a
success, success, pp, is the same for each repeat of the , is the same for each repeat of the
Bernoulli trial. Bernoulli trial.
But the coin has no memory: Bernoulli trials are But the coin has no memory: Bernoulli trials are
independent. independent.
stationaritystationarityassumptionassumption
independenceindependenceassumptionassumption
The Binomial Distribution. Max Chipulu, University of Southampton 2009
6
Multiple Answer Question: Which of the Multiple Answer Question: Which of the following are Bernoulli Trialsfollowing are Bernoulli Trials
•• A: The Lotto draw A: The Lotto draw
•• B: The experiment: randomly select a company B: The experiment: randomly select a company from all public limited companies in the UK. If the from all public limited companies in the UK. If the company is in Liquidation, the experiment is company is in Liquidation, the experiment is successful. If the company is in the Biomedical successful. If the company is in the Biomedical industry, the experiment is a failure. industry, the experiment is a failure.
•• C: Randomly selecting balls from a population C: Randomly selecting balls from a population containing white balls and black balls containing white balls and black balls
The Binomial Distribution. Max Chipulu, University of Southampton 2009
7
Multiple Answer Question: Which of the Multiple Answer Question: Which of the following are repeats of Bernoulli Trialsfollowing are repeats of Bernoulli Trials
•• D: The game of jokerD: The game of joker’’s challenge is played with s challenge is played with the full deck of cards: The player is shown a card, the full deck of cards: The player is shown a card, and s/he calls whether the next card will be lower and s/he calls whether the next card will be lower or higher, if the call is correct the game is or higher, if the call is correct the game is repeated, and so onrepeated, and so on
•• E: A box contains 20 packs of chocolate, 8 of E: A box contains 20 packs of chocolate, 8 of which are milk. Selecting a chocolate, checking if which are milk. Selecting a chocolate, checking if its milk, eating eat it, really enjoying it and then its milk, eating eat it, really enjoying it and then repeating the exercise.repeating the exercise.
•• F: The gender of a randomly selected CEOF: The gender of a randomly selected CEO
The Binomial Distribution. Max Chipulu, University of Southampton 2009
8
Binomial ProbabilityBinomial Probability
Before a coin is tossed six times in a roll, what Before a coin is tossed six times in a roll, what
is the probability that in total there will be two is the probability that in total there will be two
‘‘headsheads’’ out of six?out of six?
Method 1: The painstaking, torturous way:Method 1: The painstaking, torturous way:
List all possible results that the arise from the List all possible results that the arise from the six coin tosses. Count the total. Count how six coin tosses. Count the total. Count how many times 2 'headsmany times 2 'heads‘‘ are revealed. Calculate are revealed. Calculate
the probability. the probability.
The Binomial Distribution. Max Chipulu, University of Southampton 2009
9
Method 2: The easy Way. Use a formula.
Somebody has already done all this before. There is a formula. It tells us how to obtain i things out of n.
)!(!
!:isIt
ini
nCi
n−
=
Where n! or ‘n factorial’ = n(n-1)(n-2)(n-3)…3*2*1;
15))1*2*3*4(*1*2(
1*2*3*4*5*6
:is scoin tossesix by the revealed
becan heads 2 timesofnumber total theThus,
2
6 ==C
The Binomial Distribution. Max Chipulu, University of Southampton 2009
10
Question: What is the probability that in total 2 Question: What is the probability that in total 2
coins out of six tossed will be heads? coins out of six tossed will be heads?
We know there are 15 ways of selecting 2 We know there are 15 ways of selecting 2 successes out of six trials. So the probability successes out of six trials. So the probability
we want is one these 15 combinations:we want is one these 15 combinations:
P(xP(x = 2) = P(HHTTTT or HTHTTT or HTTHTT = 2) = P(HHTTTT or HTHTTT or HTTHTT
or HTTTHT or HTTTTH or THHTTT etc)or HTTTHT or HTTTTH or THHTTT etc)
First, the Addition RuleFirst, the Addition Rule
The Binomial Distribution. Max Chipulu, University of Southampton 2009
11
Mutual Exclusivity Mutual Exclusivity
But we can only have one combination revealing two But we can only have one combination revealing two
people at any given time:people at any given time:
For example its either For example its either HTHTTT or HTTHTTHTHTTT or HTTHTT, not , not
bothboth
They are mutually exclusive. So the Addition rule They are mutually exclusive. So the Addition rule
simplifies to:simplifies to:
P(iP(i = 2) = P(HHTTTT) +P(HTHTTT) + P(HTTHTT) = 2) = P(HHTTTT) +P(HTHTTT) + P(HTTHTT)
+ P(HTTTHT) + P(HTTTTH) + + P(HTTTHT) + P(HTTTTH) + ……. .
The Binomial Distribution. Max Chipulu, University of Southampton 2009
12
Second, the Multiplication Rule
What is the probability that a sequence of results such
as HHTTTT will be revealed?
P(HHTTTT) = P(H)*P(HTTTT|H)
We want to know: What is the probability that the
sequence HTTTT will be revealed successively, if the
first result is heads?
But successive trials are independent: Whether or not the
first result is heads does not affect the results of the next
five trials.
So we simplify: P(HHTTTT) = P(HHTTTT) = P(H)*P(HTTTT|H) = =
P(H)*P(HTTTT)P(H)*P(HTTTT)
The Binomial Distribution. Max Chipulu, University of Southampton 2009
13
The Multiplication Rule, ContThe Multiplication Rule, Cont’’dd
In the same way, we can expand P(HTTTT) = In the same way, we can expand P(HTTTT) =
P(H)*P(TTTT) P(H)*P(TTTT)
And so on, and so forth, so that in the end:And so on, and so forth, so that in the end:
P(HHTTTT) = P(H)*P(H)*P(T)P*(T)*P(T)*P(T)P(HHTTTT) = P(H)*P(H)*P(T)P*(T)*P(T)*P(T)
P(HTTTTT) = P(HTTTTT) = P(H)P(H)22P(T)P(T)44 = 0.5= 0.522*0.5*0.544 = 0.015625= 0.015625
The Binomial Distribution. Max Chipulu, University of Southampton 2009
14
The Multiplication Rule, ContThe Multiplication Rule, Cont’’dd
A little thought should show that all the other A little thought should show that all the other
combinations two heads out of six trials have the same combinations two heads out of six trials have the same
probability:probability:
P(HHTTTT) =P(HTHTTT) = P(HTTHTT) P(HHTTTT) =P(HTHTTT) = P(HTTHTT)
=P(TTTHTT) =P(HTTTTH) =P(HTTTTH), etc..=P(TTTHTT) =P(HTTTTH) =P(HTTTTH), etc..
Hence P(2 heads out of six trials) = 15 * Hence P(2 heads out of six trials) = 15 * 0.50.522*0.5*0.544 = =
0.23440.2344
The Binomial Distribution. Max Chipulu, University of Southampton 2009
15
Binomial DistributionBinomial Distribution
We obtained these values as follows:We obtained these values as follows:
P(2 Sufferers) = 15 * P(2 Sufferers) = 15 * 0.50.522*0.5*0.544
152
6 =C
P(success) = p = 0.5
P(failure) =1 - p =
0.5
4 4 failuresfailures
2 2 successessuccesses
The Binomial Distribution. Max Chipulu, University of Southampton 2009
16
We can We can generalisegeneralise this expression so that we are this expression so that we are able to calculate the probability for any number of able to calculate the probability for any number of
successes successes ii in in nn Bernoulli trials, for which the Bernoulli trials, for which the probability of success of each is probability of success of each is pp::
inii
nppCixP −
−== )1()(
This is the binomial distributionThis is the binomial distribution
i successes. P(success) = p
n – i failures. P(failure) =1 - p
Number of combinations of i
out of n
The Binomial Distribution. Max Chipulu, University of Southampton 2009
17
We can derive the expected value and the We can derive the expected value and the variance for this distribution. variance for this distribution.
They are:They are:
np=µ )1(2 pnp −=σ
The Binomial Distribution. Max Chipulu, University of Southampton 2009
18
The Binomial Distribution Example: Mortgage Default The Binomial Distribution Example: Mortgage Default RatesRates
• It is estimated that 1.5% of home owners (with a mortgage) will default on their mortgage. Suppose a random sample of 12 home owners is taken. What is the probability that
• (a) none of them will default
• (b) at least one of them will default
• Is the probability that all of them will default the same as none of them will default?
• Suggested calculation steps
• 1. This a Binomial Distribution- why?
• 2. What is the trial, what is the success, what is the probability of a success?
• 3. Calculate probabilities using the formula
The Binomial Distribution. Max Chipulu, University of Southampton 2009
19
Solution
The Binomial Distribution. Max Chipulu, University of Southampton 2009
20
Solution Continued
The Binomial Distribution. Max Chipulu, University of Southampton 2009
21
Solution Continued
The Binomial Distribution. Max Chipulu, University of Southampton 2009
22
Solution Continued
The Binomial Distribution. Max Chipulu, University of Southampton 2009
23
Experiment: All Colas Taste Experiment: All Colas Taste SameSame
Need Ten Volunteers
Ten people that love colas
The Binomial Distribution. Max Chipulu, University of Southampton 2009
24
Example: Cola Flavours in a Supermarket (1997/98 Exam)
A product manager is in charge of a cola in a supermarket. His superior,
the managing director, and the publicity department of the company,
claim that this cola, Supercola, has a very distinctive flavour. The
product manager is of the opinion that, without seeing the label, people
are unable to discriminate between colas. In order to test his theory,
the product manager conducts an experiment. He asks ten individuals to
assess if the liquid in a cup is Supercola or one of the well-known
brands: Pocacola and Colaloca. The results are as follows:
The Binomial Distribution. Max Chipulu, University of Southampton 2009
25
Example: Cola Flavours in a Supermarket (1997/98 Exam)
1 Colaloca Supercola
2 Supercola Colaloca
3 Colaloca Pocacola
4 Pocacola Pocacola
5 Supercola Colaloca
6 Colaloca Supercola
7 Pocacola Pocacola
8 Pocacola Supercola
9 Supercola Supercola
10 Colaloca Pocacola
The Binomial Distribution. Max Chipulu, University of Southampton 2009
26
(a) What can the product manager conclude from the above
experiment? Identify a probability model and use it to arrive
at a conclusion.
Explain your reasoning and give any relevant equations.
(b) The managing director is of the opinion that ten trials is a very
small number on which to base a marketing strategy, and insists
that a larger experiment of 300 individuals should be
conducted. You are requested to calculate the range of values
within which it can be concluded that people cannot discriminate
between colas. Explain your answer and give any relevant
equations.
The Binomial Distribution. Max Chipulu, University of Southampton 2009
27
Binomial Test Example: Are Greek SMEs Risk Averse?
As part of her dissertation into the risk appetite of Greek SMEs (Small to Medium
Enterprises) Margarita Georgousopoulou (2009 Risk Management
Dissertation) asked respondents to rate their response on a Likert scale with
categories 1 to 5, where by 1= ‘Very Risk Seeking’, 2 = ‘Risk Seeking’, 3 =
‘Risk Neutral’, 4 = ‘Risk Averse’ and 5 = ‘Very Risk Averse’.
She tested several variables on this scale.
For the ‘Machinery Investment’ Variable, the results were as in the table below:
Can it be concluded that Greek SMEs are risk averse vis-à-vis ‘machinery investment’?
The Binomial Distribution. Max Chipulu, University of Southampton 2009
28
Greek SMEs Solution
• Define two events, a success and a failure, such that:
• Event = ‘Success’ if response value is greater than 3, i.e. SME is Risk Averse
• Event = ‘Failure’ if response value is 3 or less, i.e. SME is NOT risk averse
• From the table, number of successes, i = 24. Number of trials = Sample size = 54.
• Why is the binomial distribution a reasonable model for this situation?
• Binomial Test question: is 24 successes out of 54 trials statistically significant?
The Binomial Distribution. Max Chipulu, University of Southampton 2009
29
Greek SMEs: Binomial Test in SPSS 17
• Load the data file from blackboard called ‘Risk Appetite.xls’ into SPSS.
• Select the worksheet called ‘raw data’
• From the ‘Analyze’ menu, select ‘nonparametric tests’
• Select ‘Binomial’
• Enter the variable ‘machinery investment’ into the ‘test variable box’
• In ‘Define Dichotomy’, select ‘cut point’. Enter ‘3’ in the cut point box. This tells SPSS that the values equal to or less than 3 are classed as one category, while values above are in the other category (hence the ‘dichotomy’, which refers to binary categories)
The Binomial Distribution. Max Chipulu, University of Southampton 2009
30
Greek SMEs: Binomial Test in SPSS 17 Cont’d
• In the box labeled ‘test proportion’, enter ‘0.4’:This will tell SPSS that under the null hypothesis, the expected proportion of values above 3 is 40% (this is because 2 of the five categories, i.e. 4 and 5 are higher than 3). Therefore the Binomial test is to see if the observed proportion (of 24/54) is significantly higher than 0.4
• Press ‘ok’ to run the model.
The Binomial Distribution. Max Chipulu, University of Southampton 2009
31
Greek SMEs: Binomial Test in SPSS 17 Cont’d
Or better still, press ‘paste’: This will paste the program syntax into a new syntax or program window. Whatever you do in SPSS, it is based on some program syntax. If you just use the menus, you cannot normally see the syntax. Yet, it is more efficient to run the syntax rather than use the menus, especially if you wish to repeat the analysis, since all you have to do is run the syntax again. Even better you can run tests on other variables simply by changing the variable name in the syntax. You could also change the test characteristics, such as the cut point and the test proportion. Furthermore, via the brilliant ‘copy’ and ‘paste’ keyboard controls, you can run all the analysis in one go, as one program. TRY THIS: you will feel better!!
• To run the model, press the ‘run’ button in the syntax window, which looks like the ‘play’ button on a CD player.
The Binomial Distribution. Max Chipulu, University of Southampton 2009
32
Greek SMEs: SPSS Binomial Test Result
• The significance of the binomial test is given under the column ‘Asymp. Sig.’ This is a one-tailed test, since we’re only testing whether the observed proportion is greater than 0.4, so that our test is only one side of 0.4. The test would be two-tailed if we were testing the hypothesis that the proportion is exactly equal to 0.4
• The value of significance is 0.015. What can we conclude from this?
The Binomial Distribution. Max Chipulu, University of Southampton 2009
33
Greek SMEs: Binomial Test in SPSS 17 Exercise
Please try this at home: Following the steps above, test whether or not the Greek SMEs are risk averse in the following variables.
(i) ‘new product investment’;
(ii) ‘new employee investment’; and
(iii) ‘new market investment’