Download P - bYTEBoss

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

Statistics wikipedia , lookup

History of statistics wikipedia , lookup

Probability wikipedia , lookup

Ars Conjectandi wikipedia , lookup

Transcript
BCOR 1020
Business Statistics
Lecture 10 – February 19, 2008
Overview
• Chapter 6 – Discrete Distributions
– Bernoulli Distribution
– Binomial Distribution
Chapter 6 – Bernoulli Distribution
Bernoulli Experiments:
• A Bernoulli Experiment is a random experiment, the
outcome of which can be classified in one of two mutually
exclusive and exhaustive ways:
– One outcome is arbitrarily labeled a “success” (denoted
X = 1) and the other a “failure” (denoted X = 0).
P(X = 1) = P(success) = p
P(X = 0) = P(failure) = 1 – p
• Note that P(0) + P(1) = (1 – p) + p = 1 and 0 < p < 1.
• “Success” is usually defined as the less likely outcome
so that p < .5 for convenience.
Chapter 6 – Bernoulli Distribution
Bernoulli Experiments:
Some examples of Bernoulli experiments:
Bernoulli Experiment
Possible Outcomes
Probability of
“Success”
Flip a coin
1 = heads
0 = tails
p = .50
Inspect a jet turbine blade
1 = crack found
0 = no crack found
p = .001
Purchase a tank of gas
1 = pay by credit card
0 = do not pay by credit
card
p = .78
Purchase a Lottery ticket
1 = all 6 numbers match
0 = fewer than 6 match
p = .0000002
Chapter 6 – Bernoulli Distribution
The PDF of the Bernoulli Experiment:
P( X  x)  f ( x)  p x (1  p )1 x , x  0,1
The Mean and Variance of the Bernoulli Experiment:
1
  E ( X )   x  f ( x)  0  (1  p )  1 p

 p
x 0
1
  V ( X )   ( x   ) 2  f ( x)  (0   ) 2  (1  p )  (1   ) 2  p
2
x 0
 (p ) 2  (1  p )  (1  p ) 2  p
 p (1  p )p  (1  p )
/
  p (1  p )
2
/
Chapter 6 – Binomial Distribution
Bernoulli Trials:
• If we repeat a Bernoulli Experiment several (n)
times independently, we have n Bernoulli trials.
– n Independent Bernoulli experiments
– P(“success”) = p on each of the n trials
• Example: Suppose we roll a single die 4 times
and observe whether a “1” is rolled each time.
• This would constitute a set of n = 4 Bernoulli
trials with …
p = P(“success”) = P(“1” is rolled)
p  16
Chapter 6 – Binomial Distribution
The Binomial Distribution:
• If X denotes the number of “successes” observed in n
Bernoulli trials, then we say that X has the Binomial
distribution with parameters n and p.
• This is often denoted X~b(n,p)
• We can determine the following about X based on the
values of n and p :
– The PDF of X, f(x) = P(X = x)
– The mean of X,  = E(X)
– The variance of X,  2 = V(X)
– The std. deviation of X, 
Chapter 6 – Binomial Distribution
The PDF of the Binomial Distribution:
• To find the PMF of the Binomial distribution, we observe
that it consists of n independent Bernoulli distributions,
each with parameter p.
• The probability of observing x “successes” in n Bernoulli
trials will be given by the product of …
– P(x “successes”) and P((n – x) “failures”)
 P( X  1) x P( x  0) n x  p x (1  p ) n x
– And the number of ways in which this combination of successes
and failures can occur
 nCx 
n!
x!( n  x )!
Chapter 6 – Binomial Distribution
The PDF of the Binomial Distribution:
P( X  x)  f ( x) n Cxp x (1  p ) n x 
n!
x!( n  x )!
p x (1  p ) n x ,
x  0,1,2,, n
The mean of the Binomial Distribution:
  E ( X )  np
The variance and standard deviation of the
Binomial Distribution:
 2  V ( X )  n  p  (1  p )
  n  p  (1  p )
Chapter 6 – Binomial Distribution
Parameters
PDF
n = number of trials
p = probability of success
P ( x) 
n!
p x (1  p)n  x
x !(n  x)!
Excel function
=BINOMDIST(k,n,p,0)
Range
X = 0, 1, 2, . . ., n
Mean
np
Std. Dev.
np(1  p)
Random data generation
in Excel
Sum n values of =1+INT(2*RAND()) or use
Excel’s Tools | Data Analysis
Comments
Skewed right if p < .50, skewed left if
p > .50, and symmetric if p = .50.
Chapter 6 – Binomial Distribution
Example: Quick Oil Change Shop
• It is important to quick oil change shops to ensure that a
car’s service time is not considered “late” by the
customer.
• Service times are defined as either late or not late.
• X is the number of cars that are late out of the total
number of cars serviced.
• Assumptions:
- cars are independent of each other
- probability of a late car is consistent
Chapter 6 – Binomial Distribution
Example: Quick Oil Change Shop
• Assuming that the probability that a car is late is
P(late) = p = 0.10,…
a)
For the next n = 10 cars serviced, what are the mean and
standard deviation for the number of late cars?
  n  p  10  (0.1)  1
  n  p  (1  p )  10  (0.1)  (0.9)  0.949
b)
What is the probability that exactly 2 of the next n = 10 cars
serviced are late (i.e. P(X = 2))?
P( X  x)  f ( x) n C x  p x  (1  p ) n  x
P( X  2)  f (2) 10 C2  (0.1) 2  (0.9)8

10!
2!8!
 (0.1) 2  (0.9)8  45  (0.1) 2  (0.9)8  0.1937
Clickers
A real estate agent estimates that her probability of
selling a house is 10%. If she shows houses to 5
customers today, what is the expected number of
houses she will sell?
A = 0.0
B = 0.2
C = 0.5
D = 1.0
Clickers
A real estate agent estimates that her probability of
selling a house is 10%. If she shows houses to 5
customers today, what is the standard deviation for
the number of houses she will sell?
A = 0.45
B = 0.67
C = 0.90
D = 0.95
Clickers
A real estate agent estimates that her probability of
selling a house is 10%. If she shows houses to 5
customers today, what is the probability that she
will sell one house?
A = 0.4095
B = 0.3281
C = 0.6719
D = 0.5905
Chapter 6 – Binomial Distribution
Binomial Shape:
• A binomial distribution is
1) skewed right if p < .50,
2) skewed left if p > .50,
3) and symmetric if p = .50
• Skewness decreases as n increases, regardless
of the value of p.
– For large n, the binomial distribution is symmetric!
• To illustrate, consider the following graphs:
Chapter 6 – Binomial Distribution
p = .20
Skewed right
0.45
p = .50
Symmetric
p = .80
Skewed left
0.45
0.35
0.40
0.40
0.30
0.35
0.35
0.25
0.30
n=5
0.30
0.25
0.20
0.25
0.20
0.15
0.20
0.15
0.15
0.10
0.10
0.10
0.05
0.05
0.00
0.05
0.00
0.00
0
5
10
15
20
0
5
10
Num ber of Successes
15
0
20
10
15
20
15
20
Num ber of Successes
0.35
0.30
0.35
0.30
0.25
0.30
0.20
0.25
0.25
0.20
n = 10
5
Num ber of Successes
0.20
0.15
0.15
0.15
0.10
0.10
0.10
0.05
0.05
0.00
0.05
0.00
0
5
10
15
20
0.00
0
5
Num ber of Successes
10
15
20
0
5
Num ber of Successes
0.20
0.25
10
Num ber of Successes
0.25
0.18
0.20
0.16
0.20
0.14
0.15
n = 20
0.12
0.15
0.10
0.10
0.08
0.10
0.06
0.05
0.05
0.04
0.02
0.00
0
5
10
Num ber of Successes
15
20
0.00
0.00
0
5
10
Num ber of Successes
15
20
0
5
10
Num ber of Successes
15
20
Chapter 6 – Binomial Distribution
Compound Events:
• Individual probabilities can be added to obtain any
desired event probability.
• For example, the probability that a sample of 4
patients will contain at least 2 uninsured patients is
• HINT: What inequality means “at least?”
P(X  2) = P(2) + P(3) + P(4)
In this example we can also use the complimentary
probability, P(A’) = 1 – P(A):
P(X  2) = 1 – P(X < 2) = 1 – P(0) – P(1)
Chapter 6 – Binomial Distribution
Compound Events:
• We must determine which inequality corresponds to
our problem:
• “fewer than” = “less than” =
" "
• “at most” = “no more than” =
" "
• “more than” = “greater than” =
" "
• “at least” = “no fewer than” =
" "
Clickers
A real estate agent estimates that her probability of
selling a house is 10%. If she shows houses to 5
customers today, what is the probability that she
will sell at least one house?
A = 0.4095
B = 0.3281
C = 0.6719
D = 0.5905
Chapter 6 – Binomial Distribution
Recognizing Binomial Applications:
• Look for n independent Bernoulli trials with
constant probability of success.
– Recall: A Bernoulli Experiment is one in which there
are two mutually exclusive and exhaustive outcomes
(“success” or “failure”).
P(“success”) = p
– If we repeat a Bernoulli Experiment n times
independently then we have n Bernoulli trials with
P(“success”) = p.
• If we are counting the number of “successes”
observed in n Bernoulli trials, then we have a
Binomial Distribution, X~b(n,p).
Clickers
In a manufacturing process involving 5 mm bolts,
our supplier guarantees that 95% of the bolts they
sell to us meet specifications. If we select 50 of
these bolts at random and observe the number of
bolts that don’t meet specification, what type of
probability distribution best describes our experiment?
A = Bernoulli Distribution
B = Binomial with n = 50, p = 0.95
C = Binomial with n = 50, p = 0.05
D = None of the above