binomial experiment

Download Report

Transcript binomial experiment

Probability Distributions
Discrete
Discrete data
• Discrete data can only take exact values
• Examples:
• The number of cars passing a checkpoint in 30 minutes
• The show sizes of students in a class
• The number of tomatoes on each plant in a greenhouse
• Variables with many repeated values are treated as
discrete
Continuous data
• Continuous data can be given values within a
specified range or measured to a specified degree
of accuracy.
• Examples:
• The speed of a vehicle as it passes a checkpoint
• The mass of a cooking apple
• The time taken by a volunteer to perform a task
• Variables with few repeated values are treated as
continuous
Binomial distribution
Attributes of a Binomial Experiment
• A binomial experiment is a
statistical experiment that has the
following properties:
Attributes of a Binomial Experiment
• The experiment consists of n repeated trials.
• Each trial can result in just two possible
outcomes. We call one of these outcomes a
success and the other, a failure.
• The probability of success, denoted by p, is
the same on every trial.
• The trials are independent; that is, the
outcome on one trial does not affect the
outcome on other trials.
Two Outcomes
When a coin is flipped, the outcome is either a head
or a tail;
For convenience, one of the outcomes
can be labeled "success" and the other
outcome "failure."
Two Outcomes
When a magician guesses the card selected from a
deck, the magician can either be correct or incorrect;
Again for convenience, one of the
outcomes can be labeled "success"
and the other outcome "failure."
Two Outcomes
When a baby is born, the baby is either born in the
month of March or is not.
One of the outcomes can be labeled
"success" and the other outcome
"failure."
Two Outcomes
In each of these examples, an event has two mutually
exclusive possible outcomes.
One of the outcomes can be labeled
"success" and the other outcome
"failure."
Consider the following statistical
experiment.
• You flip a coin 2 times and count the number of
times the coin lands on heads. This is a binomial
experiment because
Consider the following statistical
experiment.
• The experiment consists of fixed trials. We
flip a coin 2 times.
• Each trial can result in just two possible
outcomes - heads or tails.
• The probability of success is constant - 0.5
on every trial.
• The trials are independent; that is, getting
heads on one trial does not affect whether
we get heads on other trials.
Experiment
• 3 dice- how many 4s?
• Does it meet the criteria of the Binomial?
Experiment
• The experiment consists of fixed trials. We
rolled 3 dice
• Each trial can result in just two possible
outcomes – ‘4’ or not a 4 on each dice
• The probability of success is constant – 1/6
on every trial (each dice).
• The trials are independent; that is, getting a
‘4’ on one trial does not affect whether we
get a ‘4’ on other dice.
4
4
N
4
N
N
4
N
4
N
4
N
4
N
Can you see the pattern?
Let’s generalise it
Do these situations meet the conditions
of the Binomial distribution?
• Experiment 1: A bag contains black, white and red
marbles that are selected one at a time, with
replacement. The colour of each marble is noted.
• Experiment 2: This is a repeat of experiment 1
except that the bag contains black and white
marbles only.
• Experiment 3: This is a repeat of experiment 1
except that the marbles are not replaced after each
selection.
Do these situations meet the conditions
of the Binomial distribution?
• At Mt Eden Foodtown, 60% of customers pay by
credit card. Find the probability that in a randomly
selected sample of ten customers
• Exactly two pay by credit card
• Fixed number of trials: 10 trials
• Two outcomes: Pay by credit card or don’t
• Probability remains constant: 60% (established over
a large number of transactions)
• Independence: Randomly selected customers
Solution
• Number of ways of picking 2 out of 10
10
customers
2
C
Solution
• Number of ways of picking 2 out of 10
10
customers
2
C
C2 (0.6) (0.4)
10
2
8
Solution
• Number of ways of picking 2 out of 10
10
customers
2
C
C2 (0.6) (0.4) = 0.0106
10
2
8
Write out the answer in long form.
• At Mt Eden Foodtown, 60% of customers pay
by credit card. Find the probability that in a
randomly selected sample of ten customers
• More than seven pay by credit card
P( X > 7) = P(8) + P(9) + P(10)
Write out the answer in long form.
• At Mt Eden Foodtown, 60% of customers pay
by credit card. Find the probability that in a
randomly selected sample of ten customers
• More than seven pay by credit card
P( X > 7) = P(8) + P(9) + P(10)
= C8 (0.6) (0.4) + C9 (0.6) (0.4) + C10 (0.6) (0.4)
10
8
2
10
9
1 10
10
0
Write out the answer in long form.
• At Mt Eden Foodtown, 60% of customers pay
by credit card. Find the probability that in a
randomly selected sample of ten customers
• More than seven pay by credit card
P( X > 7) = P(8) + P(9) + P(10)
= C8 (0.6) (0.4) + C9 (0.6) (0.4) + C10 (0.6) (0.4)
10
= 0.1673
8
2
10
9
1 10
10
0
Graphics Calculator Binomial Dist
Stats Mode
from Calc
F5 Distribution
Then F5 Binimial
Dist
For point dist
select Bpd
For cumulative
select Bcd
For P(X<3),
n = 10
p = 0.2
Use P(x £ 2)
Select Data: Variable
For P(X=3), n = 12
p = 0.15
For P(X=3) = 0.1720
P(x < 3) = 0.6778
P(x £ 2) = 0.6778
Since tables only go to
4 dp, round to 4dp
Graphics Calculator
• Notice that when using Bcd, you get the
result that is less than or equal to the input
number.
• If you needed >2, use 1 - (input 2)=
1 - 0.6778 = 0.3222
Using Tables
• 30% of pupils travel to school by bus.
• From a sample of ten pupils chosen at
random, find the probability that
• Only three travel by bus.
Using Tables
• 30% of pupils travel to school by bus. From
a sample of ten pupils chosen at random,
find the probability that only three travel by
bus.
• Fixed trials: 10 pupils
• Two outcomes: travel by bus or don’t
• Probability remains constant: 0.30
• Independence: random selection of students
n:
p:
10
0.3
0
1
2
3
4
5
6
7
8
9
P(X=k)
0.0282
0.1211
0.2335
0.2668
0.2001
0.1029
0.0368
0.0090
0.0014
0.0001
k
In general: The binomial probability for
obtaining r successes in N trials is:
P(r)= Cr (p ) (1- p )
n
r
where P(r) is the probability of
exactly r successes, N is the number
of events, and π is the probability of
success on any one trial.
n-r
This formula assumes that the events
• Number of trials is fixed
• fall into only two categories (2 outcomes which are
mutually exclusive)
• Trials are independent (e.g. are randomly selected)
• Probability is the same for each trial
:
Example 3
Consider this simple application of the
binomial distribution: What is the probability
of obtaining exactly 3 heads if a fair coin is
flipped 6 times?
For this problem, N =6, r=3, and π =
0.5.Therefore,
Two binomial distributions are shown below. Notice that for
π = 0.5, the distribution is symmetric whereas for π = 0.3, the
distribution has a positive skew.
Example 4
• In a test there are ten multiple choice questions.
For each question there is a choice of four
answers, only one of which is correct. A student
guesses the answers.
• Find the probability that he gets more than seven
correct.
• He needs to obtain over half marks to pass and
each question carries equal weight. Find the
probability that he will pass.
Expectation and Variance
• Mean of the binomial
E( X ) = np
• Variance
VAR( X ) = np (1- p )
The probability that it will be a fine day is 0.4. Find
the expected number of fine days in a week and also
the standard deviation.
E( X ) = np = 7 ´ 0.4 = 2.8
Var( X ) = np (1- p ) = 7 ´ 0.4 ´ 0.6 =1.68
s x = 1.68 =1.296
Answers are in days
The probability that a student is awarded a
distinction in the mathematics examination is 0.05.
In a randomly selected group of 50 students, what is
the most likely number of students awarded a
distinction?
• It is usually only necessary to consider the
probabilities of values of X close to the
mean. np = 50 ´ 0.05 = 2.5
P( X = 1) = 0.202
P( X = 2) = 0.261
P( x = 3) = 0.219