13.Contineous Distributions

Download Report

Transcript 13.Contineous Distributions

การแจกแจงความน่ าจะเป็ นแบบต่ อเนื่องต่ าง ๆ
The Normal Distribution and
Other Continuous Distributions
1
การแจกแจงความน่าจะเป็ น
Probability
Distributions
Discrete
Probability
Distributions
Continuous
Probability
Distributions
Binomial
Normal
Poisson
Uniform
Hypergeometric
Exponential
2
Continuous Probability Distributions
 A continuous random variable หมายถึงตัวแปรสุ่ มที่มีค่า
ต่อเนื่อง หรื อ เป็ นเศษส่ วนได้ เช่น




ความหนาของชิ้นงาน
เวลาการทางาน
อุณหภูมิ
ความสูง
 ระดับความระเอียดของค่าที่วดั ได้ข้ ึนกับความสามารถของเครื่ องมือวัด
3
The Normal Distribution
รู ประฆังควา่ (Bell Shaped)
 สมมาตร (Symmetrical)
f(X)
 Mean, Median และ Mode มีค่าเท่ ากัน

ตาแหน่ งของค่ ากลางวัดด้ วยค่ าเฉลีย่ (mean, μ)
การกระจายตัววัดด้ วยค่ าเบีย่ งเบนมาตรฐาน
(standard deviation, σ)
ตัวแปรมีค่าในช่ วง +  to  
σ
X
μ
Mean
= Median
= Mode
4
The Normal Distribution
Shape
f(X)
การเปลี่ยนค่า μ จะทาให้รูปการ
กระจายตัวเลื่อนไปทางซ้ายหรื อขวา
σ
μ
การเปลี่ยนค่า σ หมายถึงการเพิ่มหรื อ
ลดของความผันแปร และทาให้ความสู ง
ของการกระจายตัวเปลี่ยนไป
X
5
The Normal Probability
Density Function
 ฟังก์ชนั่ ความหนาแน่น (probability density function, pdf)
f(X) 
เมื่อ
1
(1/2)[(X μ)/σ] 2
e
2π
e = ค่าคงที่ทางคณิ ตศาสตร์ มีค่าประมาณ 2.71828
π = ค่าคงที่ทางคณิ ตศาสตร์ มีค่าประมาณ 3.14159
μ = ค่าเฉลี่ยของประชากร (population mean)
σ = ค่าเบี่ยงเบนมาตรฐานของประชากร (population standard deviation)
X = ตัวแปรสุ่ มแบบต่อเนื่อง
6
การแจกแจงแบบปกติมาตรฐาน
The Standardized Normal

ตัวแปรสุ่ มที่แจกแจงแบบ normal (X) ทุกตัวสามารถแปลงให้เป็ นตัว
แปรสุ่ มที่มีการแจกแจงแบบปกติมาตรฐาน standardized normal
distribution (Z) ได้
7
Translation to the Standardized
Normal Distribution

แปลง X เป็ น Z โดย subtracting the mean of X and
dividing by its standard deviation ดังนี้:
X μ
Z
σ
ตัวแปรสุ่ ม Z มีค่า mean = 0 และ standard deviation = 1 เสมอ
8
The Standardized Normal
Probability Density Function
 probability density function ของตัวแปรสุ่ ม Z
f(Z) 
เมื่อ
1
(1/2)Z 2
e
2π
e = ค่าคงที่ทางคณิ ตศาสตร์ มีค่าประมาณ 2.71828
π = ค่าคงที่ทางคณิ ตศาสตร์ มีค่าประมาณ 3.14159
Z = ตัวแปรสุ่ มแบบ standardized normal distribution
9
The Standardized
Normal Distribution

อาจเรี ยกว่า “Z” distribution


Mean = 0
Standard Deviation = 1
f(Z)
1
0
Z
Values above the mean have positive Z-values,
values below the mean have negative Z-values
10
Example

ถ้า X แจกแจงแบบปกติ (normally distributed) มีค่า mean
= 100 และ standard deviation = 50, จะได้ค่า Z
สาหรับ X = 200 คือ
X  μ 200  100
Z

 2.0
σ
50

หมายถึงค่า X = 200 มีค่าสู งกว่าค่าเฉลี่ยไป 2 เท่าของค่าเบี่ยงเบน
มาตรฐาน
11
เปรี ยบเทียบระหว่าง X และ Z units
100
0
200
2.0
X
Z
(μ = 100, σ = 50)
(μ = 0, σ = 1)
Note that the distribution is the same, only the
scale has changed. We can express the problem in
original units (X) or in standardized units (Z)
12
การคานวณความน่าจะเป็ นของการแจกแจงแบบปกติ
Probability is the
Probability
วัดได้จากพื้นที่ใต้กราฟ (area
area
under the
curve!
f(X)
under the curve)
P (a ≤ X ≤ b)
= P (a < X < b)
(Note that the
probability of any
individual value is zero)
a
b
X
13
Probability as
Area Under the Curve
The total area under the curve is 1.0, and the curve is
symmetric, so half is above the mean, half is below
f(X) P(  X  μ)  0.5
0.5
P(μ  X  )  0.5
0.5
μ
X
P(  X  )  1.0
14
Empirical Rules
What can we say about the distribution of values
around the mean? There are some general rules:
f(X)
σ
μ-1σ
μ ± 1σ encloses about
68% of X’s
σ
μ
μ+1σ
X
68.26%
15
The Empirical Rule
(continued)

μ ± 2σ covers about 95% of X’s

μ ± 3σ covers about 99.7% of X’s
2σ
3σ
2σ
μ
95.44%
x
3σ
μ
x
99.72%
16
The Standardized Normal Table
 การหาค่าความน่าจะเป็ นสามารถทาได้โดยการใช้ตารางปกติมาตรฐาน
.9772
Example:
P(Z < 2.00) = .9772
0
2.00
Z
17
การใช้ตารางปกติมาตรฐาน
(continued)
The column gives the value of
Z to the second decimal point
Z
The row shows
the value of Z
to the first
decimal point
0.00
0.01
0.02 …
0.0
0.1
.
.
.
2.0
2.0
P(Z < 2.00) = .9772
.9772
The value within the
table gives the
probability from Z =  
up to the desired Z
value
18
ขั้นตอนทัว่ ไปของการคานวณความน่าจะเป็ นของตัว
แปรสุ่ มที่แจกแจงแบบปกติ
จงหา P(a < X < b) เมื่อ X is distributed
normally:

วาดรู ป normal curve บนสเกล X
 แปลงค่าตัวแปรสุ่ ม X เป็ นตัวแปรสุ่ ม Z
 หาความน่าจะเป็ นจาก Standardized Normal Table
19
Finding Normal Probabilities
 Suppose X is normal with mean 8.0 and
standard deviation 5.0
 Find P(X < 8.6)
X
8.0
8.6
20
Finding Normal Probabilities
(continued)

Suppose X is normal with mean 8.0 and
standard deviation 5.0. Find P(X < 8.6)
X  μ 8.6  8.0
Z

 0.12
σ
5.0
μ=8
σ = 10
8 8.6
P(X < 8.6)
μ=0
σ=1
X
0 0.12
Z
P(Z < 0.12)
21
Solution: Finding P(Z < 0.12)
Standardized Normal Probability
Table (Portion)
Z
.00
.01
P(X < 8.6)
= P(Z < 0.12)
.02
.5478
0.0 .5000 .5040 .5080
0.1 .5398 .5438 .5478
0.2 .5793 .5832 .5871
Z
0.3 .6179 .6217 .6255
0.00
0.12
22
Upper Tail Probabilities
 Suppose X is normal with mean 8.0 and
standard deviation 5.0.
 Now Find P(X > 8.6)
X
8.0
8.6
23
Upper Tail Probabilities
(continued)
 Now Find P(X > 8.6)…
P(X > 8.6) = P(Z > 0.12) = 1.0 - P(Z ≤ 0.12)
= 1.0 - .5478 = .4522
.5478
1.000
1.0 - .5478
= .4522
Z
0
0.12
Z
0
0.12
24
Probability Between
Two Values

Suppose X is normal with mean 8.0 and
standard deviation 5.0. Find P(8 < X < 8.6)
Calculate Z-values:
X μ 8 8
Z

0
σ
5
X  μ 8.6  8
Z

 0.12
σ
5
8 8.6
X
0 0.12
Z
P(8 < X < 8.6)
= P(0 < Z < 0.12)
25
Solution: Finding P(0 < Z < 0.12)
Standardized Normal Probability
Table (Portion)
Z
.00
.01
.02
P(8 < X < 8.6)
= P(0 < Z < 0.12)
= P(Z < 0.12) – P(Z ≤ 0)
= .5478 - .5000 = .0478
0.0 .5000 .5040 .5080
.0478
.5000
0.1 .5398 .5438 .5478
0.2 .5793 .5832 .5871
0.3 .6179 .6217 .6255
Z
0.00
0.12
26
Probabilities in the Lower Tail
 Suppose X is normal with mean 8.0 and
standard deviation 5.0.
 Now Find P(7.4 < X < 8)
X
8.0
7.4
27
Probabilities in the Lower Tail
(continued)
Now Find P(7.4 < X < 8)…
P(7.4 < X < 8)
= P(-0.12 < Z < 0)
.0478
= P(Z < 0) – P(Z ≤ -0.12)
= .5000 - .4522 = .0478
The Normal distribution is
symmetric, so this probability
is the same as P(0 < Z < 0.12)
.4522
7.4 8.0
-0.12 0
X
Z
28
การหาค่า X ที่สอดคล้องกับความน่าจะเป็ นที่
กาหนด
 Steps to find the X value for a known
probability:
1. หาค่า Z สาหรับความน่าจะเป็ นที่ทราบค่า จากตารางค่า Z
2. หาค่า X จากสูตร:
X  μ  Zσ
29
Finding the X value for a
Known Probability
(continued)
Example:
 สมมติ X is normal with mean 8.0 and standard
deviation 5.0.
 จงหาค่า X ที่คาดว่าจะมีตวั แปร X อื่น ๆ ซึ่ งมีค่าน้อยค่านี้ประมาณ 20%
.2000
?
?
8.0
0
X
Z
30
Find the Z value for
20% in the Lower Tail
1. Find the Z value for the known probability
Standardized Normal Probability  20% area in the lower
Table (Portion)
tail is consistent with a
Z
-0.9
…
.03
.04
.05
… .1762 .1736 .1711
-0.8 … .2033 .2005 .1977
-0.7
Z value of -0.84
.2000
… .2327 .2296 .2266
?
8.0
-0.84 0
X
Z
31
Finding the X value
2. Convert to X units using the formula:
X  μ  Zσ
 8.0  ( 0.84)5.0
 3.80
So 20% of the values from a distribution
with mean 8.0 and standard deviation
5.0 are less than 3.80
32
การประเมินว่าข้อมูลแจกแจงแบบปกติหรื อไม่
 ตัวแปรสุ่ มแบบต่อเนื่องทั้งหมดมิได้แจกแจงแบบปกติ
 ก่อนการใช้งานจริ ง จึงควรศึกษาก่อนว่าการแจกแจงแบบปกติสามารถอธิ บายพฟ
ติกรรมของข้อมูลที่สนใจได้ดีเพียงใด
33
การประเมินว่าข้อมูลแจกแจงแบบปกติหรื อไม่
(continued)
 สร้าง charts or graphs
 For small- or moderate-sized data sets, do stem-andleaf display and box-and-whisker plot look
symmetric?
 For large data sets, does the histogram or polygon
appear bell-shaped?
 คานวณ descriptive summary measures
 mean, median และ mode มีค่าใกล้เคียงกันหรื อไม่?
 Is the interquartile range approximately 1.33 σ?
 ค่าพิสยั มีค่าประมาณ 6 σ?
34
การประเมินว่าข้อมูลแจกแจงแบบปกติหรื อไม่
(continued)
 Observe the distribution of the data set
 Do approximately 2/3 of the observations lie within
mean  1 standard deviation?
 Do approximately 80% of the observations lie within
mean  1.28 standard deviations?
 Do approximately 95% of the observations lie within
mean  2 standard deviations?
 Evaluate normal probability plot
 Is the normal probability plot approximately linear
with positive slope?
35
The Uniform Distribution
 The uniform distribution is a
probability distribution that has equal
probabilities for all possible
outcomes of the random variable
 Also called a rectangular distribution
36
The Uniform Distribution
(continued)
The Continuous Uniform Distribution:
1
ba
if a  X  b
f(X) =
0
otherw ise
where
f(X) = value of the density function at any X value
a = minimum value of X
b = maximum value of X
37
Properties of the
Uniform Distribution
 The mean of a uniform distribution is
ab
μ
2
 The standard deviation is
σ
(b - a)2
12
38
Uniform Distribution Example
ตัวอย่าง: Uniform probability distribution
over the range 2 ≤ X ≤ 6:
1
f(X) = 6 - 2 = .25 for 2 ≤ X ≤ 6
f(X)
μ
.25
2
6
X
σ
ab 26

4
2
2
(b - a)2

12
(6 - 2)2
 1.1547
12
39
The Exponential Distribution
 Used to model the length of time between two
occurrences of an event (the time between
arrivals)
 Examples:
 เวลาระหว่างการมาถึงท่าเรื อของรถบรรทุก
 เวลาระหว่างการถูกใช้งานโดยลูกค้าของเครื่ อง ATM
 เวลาระหว่างการเข้ามาถึงของโทรศัพท์ที่ Operators
40
The Exponential Distribution
 Defined by a single parameter, its mean λ
(lambda)
 The probability that an arrival time is less than
some specified time X is
P(arrival time  X)  1 e
where
 λX
e = mathematical constant approximated by 2.71828
λ = the population mean number of arrivals per unit
X = any value of the continuous variable where 0 < X <

41
Exponential Distribution
Example
Example: Customers arrive at the service counter at
the rate of 15 per hour. What is the probability that the
arrival time between consecutive customers is less
than three minutes?

The mean number of arrivals per hour is 15, so λ = 15

Three minutes is .05 hours

P(arrival time < .05) = 1 – e-λX = 1 – e-(15)(.05) = .5276

So there is a 52.76% probability that the arrival time
between successive customers is less than three
minutes
42
Sampling Distributions
Sampling
Distributions
Sampling
Distributions
of the
Mean
Sampling
Distributions
of the
Proportion
43
Sampling Distributions
 A sampling distribution is a
distribution of all of the possible
values of a statistic for a given size
sample selected from a population
44
Developing a
Sampling Distribution
 Assume there is a population …
 Population size N=4
A
B
C
D
 Random variable, X,
is age of individuals
 Values of X: 18, 20,
22, 24 (years)
45
Developing a
Sampling Distribution
(continued)
Summary Measures for the Population Distribution:
X

μ
P(x)
i
N
.3
18  20  22  24

 21
4
σ
 (X  μ)
i
N
.2
.1
0
2
 2.236
18
20
22
24
A
B
C
D
x
Uniform Distribution
46
Developing a
Sampling Distribution
(continued)
Now consider all possible samples of size n=2
1st
Obs
2nd Observation
18
20
22
24
18 18,18 18,20 18,22 18,24
16 Sample
Means
20 20,18 20,20 20,22 20,24
1st 2nd Observation
Obs 18 20 22 24
22 22,18 22,20 22,22 22,24
18 18 19 20 21
24 24,18 24,20 24,22 24,24
20 19 20 21 22
16 possible samples
(sampling with
replacement)
22 20 21 22 23
24 21 22 23 24
47
Developing a
Sampling Distribution
(continued)
Sampling Distribution of All Sample Means
Sample Means
Distribution
16 Sample Means
1st 2nd Observation
Obs 18 20 22 24
18 18 19 20 21
20 19 20 21 22
22 20 21 22 23
24 21 22 23 24
_
P(X)
.3
.2
.1
0
18 19
20 21 22 23
24
_
X
(no longer uniform)
48
Developing a
Sampling Distribution
(continued)
Summary Measures of this Sampling Distribution:
μX
X


i
N
σX 

18  19  21   24

 21
16
2
(
X

μ
)
i

X
N
(18 - 21)2  (19 - 21)2    (24 - 21)2
 1.58
16
49
Comparing the Population with its
Sampling Distribution
Population
N=4
μ  21
σ  2.236
Sample Means Distribution
n=2
μX  21
σ X  1.58
_
P(X)
.3
P(X)
.3
.2
.2
.1
.1
0
18
20
22
24
A
B
C
D
X
0
18 19
20 21 22 23
24
_
X
50
Sampling Distributions
of the Mean
Sampling
Distributions
Sampling
Distributions
of the
Mean
Sampling
Distributions
of the
Proportion
51
Standard Error of the Mean
 Different samples of the same size from the same
population will yield different sample means
 A measure of the variability in the mean from sample to
sample is given by the Standard Error of the Mean:
σ
σX 
n
 Note that the standard error of the mean decreases as
the sample size increases
52
If the Population is Normal
 If a population is normal with mean μ and
standard deviation σ, the sampling distribution
of X is also normally distributed with
μX  μ
and
σ
σX 
n
(This assumes that sampling is with replacement or
sampling is without replacement from an infinite population)
53
Z-value for Sampling Distribution
of the Mean
 Z-value for the sampling distribution of X :
Z
where:
( X  μX )
σX
( X  μ)

σ
n
X = sample mean
μ = population mean
σ = population standard deviation
n = sample size
54
Finite Population Correction
 Apply the Finite Population Correction if:
 the sample is large relative to the population
(n is greater than 5% of N)
and…
 Sampling is without replacement
Then
( X  μ)
Z
σ Nn
n N 1
55
Sampling Distribution Properties
μx  μ

Normal Population
Distribution
μ
(i.e.
x is unbiased )
x
Normal Sampling
Distribution
(has the same mean)
μx
x
56
Sampling Distribution Properties
(continued)
 For sampling with replacement:
As n increases,
Larger
sample size
σ x decreases
Smaller
sample size
μ
x
57
If the Population is not Normal
 We can apply the Central Limit Theorem:
 Even if the population is not normal,
 …sample means from the population will be
approximately normal as long as the sample size is
large enough.
Properties of the sampling distribution:
μx  μ
and
σ
σx 
n
58
Central Limit Theorem
As the
sample
size gets
large
enough…
n↑
the sampling
distribution
becomes
almost normal
regardless of
shape of
population
x
59
If the Population is not Normal
(continued)
Population Distribution
Sampling distribution
properties:
Central Tendency
μx  μ
σ
σx 
n
Variation
μ
x
Sampling Distribution
(becomes normal as n increases)
Larger
sample
size
Smaller
sample size
(Sampling with
replacement)
μx
x
60
How Large is Large Enough?
 For most distributions, n > 30 will give a
sampling distribution that is nearly normal
 For fairly symmetric distributions, n > 15
 For normal population distributions, the
sampling distribution of the mean is always
normally distributed
61
Example
 Suppose a population has mean μ = 8 and
standard deviation σ = 3. Suppose a random
sample of size n = 36 is selected.
 What is the probability that the sample mean is
between 7.8 and 8.2?
62
Example
(continued)
Solution:
 Even if the population is not normally
distributed, the central limit theorem can be
used (n > 30)
 … so the sampling distribution of
approximately normal
x
is
 … with mean μx = 8
σ
3
 …and standard deviation σ x  n  36  0.5
63
Example
(continued)
Solution (continued):


μ
μ
 7.8 - 8
8.2 - 8 
X
P(7.8  μ X  8.2)  P



3
σ
3


36
n
36 

 P(-0.5  Z  0.5)  0.3830
Population
Distribution
???
?
??
?
?
?
?
?
μ8
Sampling
Distribution
Standard Normal
Distribution
Sample
.1915
+.1915
Standardize
?
X
7.8
μX  8
8.2
x
-0.5
μz  0
0.5
Z
64
Sampling Distributions
of the Proportion
Sampling
Distributions
Sampling
Distributions
of the
Mean
Sampling
Distributions
of the
Proportion
65
Population Proportions, p
p = the proportion of the population having
some characteristic
 Sample proportion ( ps ) provides an estimate
of p:
ps 
X
number of items in the sample having the characteristic of interest

n
sample size
 0 ≤ ps ≤ 1
 ps has a binomial distribution
(assuming sampling with replacement from a finite population or
without replacement from an infinite population)
66
Sampling Distribution of p
 Approximated by a
normal distribution if:

Sampling Distribution
.3
.2
.1
0
np  5
and
0
n(1 p)  5
where
P( ps)
μps  p
and
σp s
.2
.4
.6
8
1
ps
p(1 p)

n
(where p = population proportion)
67
Z-Value for Proportions
Standardize ps to a Z value with the formula:
ps  p
Z

σ ps
 If sampling is without replacement
and n is greater than 5% of the
population size, then σ p must use
the finite population correction
factor:
ps  p
p(1 p)
n
σ ps 
p(1  p) N  n
n
N 1
68
Example
 If the true proportion of voters who support
Proposition A is p = .4, what is the probability
that a sample of size 200 yields a sample
proportion between .40 and .45?
 i.e.: if p = .4 and n = 200, what is
P(.40 ≤ ps ≤ .45) ?
69
Example
(continued)

Find σ ps:
if p = .4 and n = 200, what is
P(.40 ≤ ps ≤ .45) ?
σ ps
p(1 p)
.4(1 .4)


 .03464
n
200
Convert to
.45  .40 
 .40  .40
P(.40  p s  .45)  P
Z

standard
.03464 
 .03464
normal:
 P(0  Z  1.44)
70
Example
(continued)

if p = .4 and n = 200, what is
P(.40 ≤ ps ≤ .45) ?
Use standard normal table:
P(0 ≤ Z ≤ 1.44) = .4251
Standardized
Normal Distribution
Sampling Distribution
.4251
Standardize
.40
.45
ps
0
1.44
Z
71