Download Normal Approximation

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
Introductory Statistics Lectures
Normal Approximation
To the binomial distribution
Anthony Tanbakuchi
Department of Mathematics
Pima Community College
Redistribution of this material is prohibited
without written permission of the author
© 2009
(Compile date: Tue May 19 14:49:54 2009)
Contents
1 Normal Approximation
1.1 Introduction . . . . . . .
1.2 The approximation . . .
Continuity correction . .
1
1.1
1
1
2
4
1.3
1.4
Examples . . . . . . . .
Summary . . . . . . . .
Additional Examples . .
Normal Approximation
Introduction
Plot of binomial distribution with fixed n = 20, varying p.
1
4
6
6
2 of 6
1.2 The approximation
0.3
0.0
0.1
0.2
Pbinom(x)
0.3
0.2
0.1
0.0
Pbinom(x)
0.4
Pbinom(x,, n = 20,, p = 0.1)
0.4
Pbinom(x,, n = 20,, p = 0.05)
10
15
20
25
30
0
10
15
20
x
Pbinom(x,, n = 20,, p = 0.5)
Pbinom(x,, n = 20,, p = 0.95)
25
30
25
30
0.3
0.0
0.1
0.2
Pbinom(x)
0.3
0.2
0.1
0.0
Pbinom(x)
5
x
0.4
5
0.4
0
0
5
10
15
20
25
30
0
5
10
15
x
20
x
Sometimes the binomial has the same shape as the normal.
1.2
Definition 1.1
The approximation
Normal distribution approximation of the binomial distribution.
A binomial distribution can be approximated as a normal distribution
when:
np ≥ 5
and
nq ≥ 5
(1)
recall that a binomial random variable has:
µ = np
σ=
√
npq
(2)
(3)
Illustration of normal approximation
Given a binomial distribution with n = 20 and p = 0.5 then np = nq = 10 ≥ 5,
therefore the approximation should be valid.
Anthony Tanbakuchi
MAT167
Normal Approximation
3 of 6
Normal Approx to Binom: n=20, p=0.5
0.00
0.05
0.10
0.15
binomial dist P(x)
normal approx f(x)
0
5
10
15
20
25
30
x
Thus, if np ≥ 5 and nq ≥ 5 we can use the normal distribution to approximately describe a binomial random variable.
Question 1. If we use the normal distribution to approximate the binomial,
can we find P (x = 10) with the normal distribution?
Area under the normal distribution
Given a binomial distribution with n = 20 and p = 0.5, find P (x = 10) using
the normal approximation.
Anthony Tanbakuchi
MAT167
4 of 6
1.2 The approximation
0.12
0.14
0.16
shaded area has a width=1
0.18
Normal Approx to Binom: n=20, p=0.5
9.0
9.5
10.0
binomial dist P(x)
normal approx f(x)
10.5
11.0
11.5
12.0
x
Pbinom (x = 10) ≈ Pnorm (9.5 < x < 10.5)
CONTINUITY CORRECTION
Definition 1.2
Continuity correction.
When using the a continuous distribution to approximate a discrete
distribution, adjust the boundaries of the area in question by
0.5.
Example 1. Examples of how to use the continuity correction:
Pbinom (x = 10) ≈ Pnorm (9.5 < x < 10.5)
Pbinom (x < 10) ≈ Pnorm (x < 9.5)
Pbinom (x ≤ 10) ≈ Pnorm (x < 10.5)
Pbinom (5 ≤ x < 10) ≈ Pnorm (4.5 < x < 9.5)
Tip: Draw a number line, put an open or closed dot for the
binomial boundaries, then adjust the boundaries to find the desired
region on the normal.
EXAMPLES
Calculating with approximation
Given a binomial distribution with n = 20 and p = 0.5, find P (x = 10) using
the normal approximation.
Since np and nq are 10, the approximation will be valid. To use the approximation, on the normal distribution we need to find P (9.5 < x < 10.5) =
F (10.5) − F (9.5):
Anthony Tanbakuchi
MAT167
Normal Approximation
5 of 6
R: n = 20
R: p = 0 . 5
R: q = 1 − p
R: mu = n ∗ p
R: mu
[ 1 ] 10
R: sigma = s q r t ( n ∗ p ∗ q )
R: sigma
[ 1 ] 2.2361
R: p . approx = pnorm ( 1 0 . 5 , mean = mu, sd = sigma ) −
+
pnorm ( 9 . 5 , mean = mu, sd = sigma )
R: p . approx
[ 1 ] 0.17694
Calculating with binomial
Given a binomial distribution with n = 20 and p = 0.5, find P (x = 10) check
the approximation using the binomial.
Checking against binomial distribution:
R: p = dbinom ( 1 0 , n , p )
R: p
[ 1 ] 0.17620
Thus p ≈ 0.177 using normal and p = 0.176 using the binomial.
Example 2. If we flip a fair coin 10,000 times, what is the probability of getting
more than 5,100 heads?
What we know
R: n = 10000
R: p = 0 . 5
R: q = 1 − p
R: mu = n ∗ p
R: mu
[ 1 ] 5000
R: sigma = s q r t ( n ∗ p ∗ q )
R: sigma
[ 1 ] 50
Is the approximation valid? (yes)
R: n ∗ p
[ 1 ] 5000
R: n ∗ q
[ 1 ] 5000
Find probability with approximation on the normal: P (x > 5100.5) =
1 − F (5100.5):
R: 1 − pnorm ( 5 1 0 0 . 5 , mean = mu, sd = sigma )
[ 1 ] 0.022216
Example 3. Check previous example by using the binomial distribution:
R: sum ( dbinom ( 5 1 0 1 : 1 0 0 0 0 , n , p ) )
[ 1 ] 0.022213
Anthony Tanbakuchi
MAT167
6 of 6
1.3
1.3 Summary
Summary
Normal approximation to the binomial distribution
• Valid when np and nq ≥ 5.
• To use:
1. Calculate µ and σ for binomial.
2. Apply continuity correction (adjust boundaries by 0.5).
3. Use cumulative normal distribution pnorm(...)
to find probability.
Tip: Draw a number line, put an open or closed dot for the
binomial boundaries, then adjust the boundaries to find the desired
region on the normal.
Although we can use the binomial distribution directly, we will use the
normal approximation later for hypothesis testing.
1.4
Additional Examples
Examples
If a binomial distribution can be satisfactorily approximated using the normal distribution, write the following binomial probabilities in terms of the
normal distribution:
Question 2. Pbinom (2 ≤ x < 5)
Question 3. If a coin is flipped 100 times, what is the probability of observing
more than 57 heads?
Question 4. Would it be unusual to observe more than 57 heads when tossing
a coin 100 times?
Anthony Tanbakuchi
MAT167