Download BINOMandGEO

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

History of statistics wikipedia , lookup

Foundations of statistics wikipedia , lookup

Inductive probability wikipedia , lookup

Law of large numbers wikipedia , lookup

Probability amplitude wikipedia , lookup

Transcript
Special Discrete
Distributions
Bernoulli Trials
• The basis for the probability models we will
examine in this chapter is the Bernoulli trial.
• We have Bernoulli trials if:
– there are two possible outcomes (success and failure).
– the probability of success, p, is constant.
– the trials are independent.
The Binomial Model
• A Binomial model tells us the probability
for a random variable that counts the
number of successes in a fixed number of
Bernoulli trials.
• Two parameters define the Binomial model:
n, the number of trials; and, p, the
probability of success. We denote this
Binom(n, p).
Binomial Distribution B(n,p)
• Each trial results in one of two mutually
exclusive outcomes. (success/failure)
B
• Outcomes of different trials are
independent
I
• There are a fixed number of trials
N
• The probability that a trial results in
success is the same for all trials
S
The binomial random variable x is defined as
the number of successes out of the fixed
number of Bernoulli trials. Therefore the
Binomial Dist. is a Discrete Distribution
Are these binomial distributions?
1) Toss a coin 10 times and count the
number of heads
Yes
2) Deal 10 cards from a shuffled deck and
count the number of red cards
No, probability does not remain constant
3) Two parents with genes for O and A
blood types are starting a family. Count
the number of children with blood type O
No, no fixed number
Toss a coin 3 times and count the
number of heads
Find the discrete probability distribution
X
P(x)
0
1
2
3
.125
.375
.375
.125
Out of 3 coins that are tossed, what is
the probability of getting exactly 2 heads?
Binomial Formula:
n  k
n k
P (x  k )    p 1  p 
k
 
Where the Binomial Coefficient determines the
number of ways to choose k events from N
n 
 n C k
k 
Out of 3 coins that are tossed,
what is the probability of getting
exactly 2 heads?
3 2
1
P (x  2)   0.5 0.5  .375
2
The number of inaccurate gauges in a
group of four is a binomial random
variable. If the probability of a defect
is 0.1, what is the probability that only
1 is defective?
 4 1
3


P (x  1)   0.1 0.9  .2916
1 
More than 1 is defective?
P (x  1)  1  (P (0)  P (1))  .0523
Calculator
• Binomialpdf(n,p,x) – this
calculates the probability of a
single binomial P(x = k)
• Binomialcdf(n,p,x) – this
calculates the cumulative
probabilities from P(0) to P(k)
(calculates cumulative probability
from left to right only)
A genetic trait of one family
manifests itself in 25% of the
offspring. If eight offspring are
randomly selected, find the
probability that the trait will
appear in exactly three of them.
P (X  3)  binomialpdf (8,.25,3)  .2076
At least 5?
P (X  5)  1  binomialcdf (8,.25,4)  .0273
In a certain county, 30% of the
voters are Republicans. If ten
voters are selected at random,
find the probability that no more
than six of them will be
Republicans. Is the independence
criteria met in this example?
Independence
• One of the important requirements for Bernoulli
trials is that the trials be independent.
• We have nothing to worry about if the population
is infinite. However, when we don’t have an
infinite population, the trials are not independent.
• Luckily, there is a rule that allows us to pretend
we have independent trials:
– The 10% condition: Bernoulli trials must be
independent. If that assumption is violated, it is still
okay to proceed as long as the sample is smaller than
10% of the population.
BACK TO THE PROBLEM
BECAUSE the population of Republicans
is so large, drawing a sample of 10
individuals barely changes the
probability of each time since 10 is
certainly less than 10% of population
of Republicans so safe to assume
independence
• P(x < 6) = binomcdf(10,.3,6) = .9894
Binomial formulas for mean
and standard deviation
 x  np
 x  np 1  p 
In a certain county, 30% of the
voters are Republicans. How
many Republicans would you expect
in ten randomly selected voters?
What is the standard deviation for
this distribution?
 x  10(.3)  3 Republicans
x  10(.3)(.7)  1.45 Republicans
•In L1 – seq(x,x,0,10)
•In L2 – binompdf(10, .1 ,L1)
•Sketch histogram
•Next go back & increase the
probability of success to .3,.5,.7,.9
•Compare the resulting histograms
What happened to the
shape of the distribution
as the probability of
success increased?
As the probability of success
increases, the shape changes from
being skewed right to symmetrical
at p =.5 to skewed left.
•Calculate the mean and standard
deviations for each of the
probabilities
What do you notice?
As the probability of success increase,
•the means increase.
•the standard deviations increase to p = .5, then
decrease. Their values are also symmetrical.
The Normal Model to the Rescue!
• When dealing with a large number of trials
in a Binomial situation, making direct
calculations of the probabilities becomes
tedious (or outright impossible).
• Fortunately, the Normal model comes to the
rescue…
The Normal Model to the Rescue
(cont.)
– Success/failure condition:
A Binomial model is approximately Normal if we
expect at least 10 successes and 10 failures:
np ≥ 10 and nq ≥ 10
• As long as the Success/Failure Condition
holds, we can use the Normal model to
approximate Binomial probabilities.
Continuous Random Variables
• When we use the Normal model to
approximate the Binomial model, we are
using a continuous random variable to
approximate a discrete random variable.
• So, when we use the Normal model, we no
longer calculate the probability that the
random variable equals a particular value,
but only that it lies between two values and
we calculate the mean & standard deviation
of the distribution using the Binomial
Formulas
Geometric Distributions:
• There are two mutually exclusive
outcomes
• Each trial is independent of the
others
• The probability of success
remains constant for each trial.
• The random variable x is the
number of trials UNTIL the
FIRST success occurs.
Differences between binomial
& geometric distributions
• The difference between
binomial and geometric
properties is that there is
NOT a fixed number of
trials in geometric
distributions!
Other differences:
•Binomial random variables
start with 0 while geometric
random variables start with 1
•Binomial distributions are
finite, while geometric
distributions are infinite
Geometric Formulas:
P (x )  p 1  p 
x 1
1
x 
p
1p
x 
2
p
Count the number of boys in a
family of four children.
Binomial:
X
0
1
2
3
4
Count children until first son
is born
Geometric:
X
1
2
3
4
. . .
What is the probability that
the first son is the 4th child
born?
P (X  4)  geometricpdf (.5,4)  .0625
What is the probability
that the first son is born is
at most the 4th child?
P (X  4)  geometriccdf (.5,4)  .9375
WHAT’S THE PROBABILITY THAT IT
TAKES MORE THAN 4 CHILDREN UNTIL
A BOY IS BORN?
A real estate agent shows a house to
prospective buyers. The probability that
the house will be sold to the person is
35%. What is the probability that the
agent will sell the house to the third
person she shows it to?
P (x  3)  geometricpdf (.35,3)  .1479
How many prospective buyers does she
expect to show the house to before
someone buys the house?
1
x 
 2.86 buyers
.35
•In L1 – input numbers 1-20
•In L2 – geometpdf(.1,L1)
•Sketch
•Find the means & standard deviations
•Increase & then decrease the probability
of success
What do you see?
•Geometric distributions are skewed
right and become more strongly
skewed right as the probability of
success increases
•Mean & standard deviation of the
distributions decrease as the
probability of success increase
Poisson Distributions
This distribution deals with the
probabilities of rare events that
occur infrequently in space, time,
distance, area, etc.
Examples:
• The number of accidents that occur
per month at a given intersection
• The number of tardies per
semester for a given student
• The number of runs per inning in a
baseball game
Properties:
• The occurrence of a success in any
interval is independent of that in any
other interval
• The probability that a success will
occur in any interval is the same for
all intervals of equal size and is
proportional to the size of the
interval
• We observe a discrete number of
events in a continuous (fixed)
interval.
Formulas:
X = number of rare events per unit of time, space, etc.
l = mean value of X (Greek letter lambda)
P (X ) 
x  l
x  l
l e
x
x!
l
The number of accidents in an office
building during a four-week period
averages 2. What is the probability
there will be one accident in the next
four-week period?
21  e 2
P (X  1) 
1!
 .2707
What is the probability that there
will be more than two accidents in
the next four-week period?
P (X  2)  1  (P (0)  ...  P (2))  .3233
8:00 of
untilcalls
8:30to
is aa 30
minute
period.
TheFrom
number
police
department
From 8:00
is apm
60 minute
period.
between
8 pmuntil
and9:00
8:30
on Friday
averages 3.5.
Since the period is doubled, you must
•What
is the
the mean
probability
calls
double
amountof
of no
calls
to during
keep
thisP(X
period?
it proportional! =.0302
= 0) = poissonpdf(3.5,0)
•What is Be
the sure
probability
of
no
calls
to adjust l!
between 8 pm and 9 pm on Friday night?
P(X = 0) = poissonpdf(7,0) =.0009
•What is the mean and standard deviation
of the number of calls between 10 pm and
 = 14 &  = 3.742
midnight on Friday night?
Examine the histograms of the Poisson
distributions
–
What happens
to
What happens to
l = 2 What
the
happens tol = 4
the shape?
means?
the standard
deviations?
l= 6
As l increases
• The distributions become
more symmetrical
• The means increase
• The standard deviations
increase