Download annotated

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

Central limit theorem wikipedia , lookup

Transcript
STAB22 Statistics I
Lecture 18
1
Bernoulli Trial

Bernoulli Trial: trial with only 2 outcomes

E.g. True/False, Yes/No, Heads/Tails



P(Success) = p, P(failure) = 1−p
Value
1
0
Prob
p
1‒p
E.g. Fair coin flip, let Success = Heads


Usually labeled Success (1) and Failure (0)
P(1) = ½, & P(0) = 1− ½ = ½
Bernoulli trials form basis of many common
probability models
2
Binomial Model

Several Bernoulli trials, but only interested in
total number of successes


Example: # students who vote Yes for a proposal
Binomial Setting:
1. Fixed number (n ) of Bernoulli trials
2. Same probability of success (p ) for each trial
3. Bernoulli trials are independent

Binomial Random Variable:

X = # of successes in a Binomial setting
3
Binomial Distribution

If X follows Binomial distribution with n trials
and probability of success p


X takes values from 0 to n (i.e. 0,1,…,n)
Probabilities given by formula
P ( X  x)  n Cx p x (1  p ) n  x , for x  0,1,..., n
n!
where: n Cx 
, n !  n  (n  1)   2 1
x ! n  x  !

Or, simply use software / probability tables
(StatCrunch: Stat > Calculators > Binomial)
4
Example

Multiple choice test has 10 questions, each with 4
choices: A,B,C or D.
Student has not studied at all, but thinks he will
give it a shot (i.e. answer at random).
What is the probability model of his score?

Does it fit the Binomial?




Number of trials?
Are they independent?
Probability of success?
Is the score a binomial RV?
5
Example (cont’d)



Find prob. student’s score is 5/10
Find prob. student passes ( ≥5/10)
Find prob. student gets at least 2
questions right ( ≥2/10)
x
P(x)
0
0.0563
1
0.1877
2
0.2816
3
0.2503
4
0.1460
5
0.0584
6
0.0162
7
0.0031
8
0.0004
9
0.0000
10
0.0000
6
Example

This Halloween, you have a bag with 14 Snickers and
22 Mars bars. Neighbor's daughter comes trick-ortreating, and picks 3 bars at random.
What is the probability model of # Mars bars?

Does it fit the Binomial?




Number of trials?
Are they independent?
Probability of success?
Is the score a Binomial RV?
Mean & Variance of Binomial

Luckily, also have formulas for mean and
variance of Binomial random variable
If X is a Binomial RV, then:
2
E  X     n  p & V  X     n  p  1  p 


Mean increases with # of trials n and probability of
success p
Variance increases with # of trials n


Variance is biggest when p = 1/2
Variance becomes small when p is close to 0 or 1
(Is that reasonable?)
8
Binomial Model for Different p
p = 0.05
p = 0.10
p = 0.20
p = 0.50
p = 0.70
n = 10
n = 10
n = 10
n = 10
n = 10
9
Binomial Model for Different n
p = 0.10
10
Example

For multiple choice test (n = 10, p = 1/4)

Find student’s expected test score

Find student’s test score variance and standard
deviation
11
Normal Approximation to
Binomial


Random variable X follows a Binomial with
n=80 trials, and p=0.5 probability of success.
You want to know the probability that X takes
values from 41 to 60, i.e. P( 41 ≤ X ≤ 60 ).


You have to calculate 20 probabilities using the
Binomial probability formula, and add them up!
P(X=41) + P(X=42) + … + P(x=60)
Thankfully there is an easier way, using the
Normal approximation to the Binomial!
Normal Approximation to
Binomial
  n p
  n  p  (1  p )
0.10
Approximate Binomial with a
Normal with the same mean &
standard deviation:
0.08

0.06
Use approximation when
np>10 AND n(1−p)>10
(Success / Failure condition)
0.04

Normal ( µ=30, σ=√15=3.87)
0.02
The Normal distribution yields
a good approximation of the
Binomial for large n values
0.00

20
23
26
29
32
35
38
Binomial (n=60, p=0.5)
Example

The management of the Santoni Pizza found that 70
percent of its new customers return for another
meal. For a week in which 80 new (first-time)
customers dined at Santoni’s, what is the probability
that 60 or more will return for another meal?

Random Variable X = number of returning
customers



Binomial distribution: X is number of successes in 80
independent trials
Binomial parameters: n=80, p=0.7
Want to find P( X ≥ 60 )
Example (cont’d)

Using Binomial probability table
(n=80, p=.7)
…
P(X ≥ 60) = 0.063 + 0.048 + 0.034 + … = 0.197
Example (cont’d)

Using Normal Approximation
16