Pertemuan 24 Uji Kebaikan Suai – Metoda Statistika Matakuliah

advertisement
Matakuliah
Tahun
Versi
: I0134 – Metoda Statistika
: 2005
: Revisi
Pertemuan 24
Uji Kebaikan Suai
1
Learning Outcomes
Pada akhir pertemuan ini, diharapkan mahasiswa
akan mampu :
• Mahasiswa dapat menghasilkan uji suatu
sebaran (distribusi).
2
Outline Materi
•
•
•
•
Statistik uji khi-kuadrat
Uji sebaran seragam
Uji sebaran binomial
Uji sebaran normal
3
Tests of Goodness of Fit and
Independence
• Goodness of Fit Test: A Multinomial
Population
• Tests of Independence: Contingency
Tables
• Goodness of Fit Test: Poisson and
Normal Distributions
4
Goodness of Fit Test:
A Multinomial Population
1. Set up the null and alternative hypotheses.
2. Select a random sample and record the
observed
frequency, fi , for each of the k categories.
3. Assuming H0 is true, compute the expected
frequency, ei , in each category by multiplying
the category probability by the sample size.
continued
5
Goodness of Fit Test:
A Multinomial Population
4. Compute the value of the test statistic.
( f ii  eii ) 22
 
eii
ii11
22
kk
 2   2
5. Reject H0 if
(where  is the significance level and
there are k - 1 degrees of freedom).
6
Contoh Soal: Finger Lakes
Homes
• Multinomial Distribution Goodness of Fit Test
The number of homes sold of each model for
100
sales over the past two years is shown below.
Model
Frame
# Sold
15
Colonial
30
Ranch
20
Split-Level A35
7
Contoh Soal: Finger Lakes Homes
• Multinomial Distribution Goodness of Fit Test
– Notation
pC = popul. proportion that purchase a colonial
pR = popul. proportion that purchase a ranch
pS = popul. proportion that purchase a split-level
pA = popul. proportion that purchase an A-frame
– Hypotheses
H0: pC = pR = pS = pA = .25
Ha: The population proportions are not
pC = .25, pR = .25, pS = .25, and pA = .25
8
Contoh Soal: Finger Lakes
Homes
• Multinomial Distribution Goodness of Fit Test
– Expected Frequencies
e1 = .25(100) = 25
e2 = .25(100) = 25
e3 = .25(100) = 25
e4 = .25(100) = 25
– Test Statistic
2
2
2
2
(
30

25
)
(
20

25
)
(
35

25
)
(
15

25
)
2 



25
25
25
25
=1+1+4+4
= 10
9
Contoh Soal: Finger Lakes
Homes
• Multinomial Distribution Goodness of Fit Test
– Rejection Rule
With  = .05 and
k-1=4-1=3
degrees of freedom
Do Not Reject H0
Reject H0
2
7.81
10
Contoh Soal: Finger Lakes
Homes
• Multinomial Distribution Goodness of Fit
Test
– Conclusion
2 = 10 > 7.81, so we reject the
assumption there is
no home style preference, at the .05
level of
significance.
11
Goodness of Fit Test: Poisson
Distribution
1. Set up the null and alternative hypotheses.
2. Select a random sample and
a. Record the observed frequency, fi , for
each of the k values of the Poisson random
variable.
b. Compute the mean number of
occurrences, .
3. Compute the expected frequency of
occurrences, ei , for each value of the Poisson
random variable.
continued
12
Goodness of Fit Test: Poisson
Distribution
4. Compute the value of the test statistic.
2
(
f

e
)
2   i i
ei
i 1
k
 2   2
5. Reject H0 if
(where  is the significance level and
there are k - 2 degrees of freedom).
13
Contoh Soal: Troy Parking
Garage
• Poisson Distribution Goodness of Fit Test
In studying the need for an additional
entrance to a city parking garage, a consultant
has recommended an approach that is
applicable only in situations where the number
of cars entering during a specified time period
follows a Poisson distribution.
14
Contoh Soal: Troy Parking Garage
• Poisson Distribution Goodness of Fit Test
A random sample of 100 one-minute time
intervals resulted in the customer arrivals listed
below. A statistical test must be conducted to
see if the assumption of a Poisson distribution is
reasonable.
# Arrivals 0 1 2 3 4 5 6 7 8 9
10 11 12
Frequency 0 1 4 10 14 20 12 12 9 8
6 3 1
15
Contoh Soal: Troy Parking Garage
• Poisson Distribution Goodness of Fit
Test
– Hypotheses
H0: Number of cars entering the
garage during
a one-minute interval is Poisson
distributed.
Ha: Number of cars entering the
garage during a
one-minute
interval is not Poisson distributed
16
Contoh Soal: Troy Parking Garage
• Poisson Distribution Goodness of Fit Test
– Estimate of Poisson Probability Function
otal Arrivals = 0(0) + 1(1) + 2(4) + . . .
+ 12(1) = 600
Total Time Periods
6 x e 6 = 100
f ( x) 
Estimate of  =x ! 600/100 = 6
Hence,
17
Contoh Soal: Troy Parking Garage
• Poisson Distribution Goodness of Fit Test
– Expected Frequencies
x
f (x )
xf (x )
x
0
1
2
3
4
5
6
.0025
.0149
.0446
.0892
.1339
.1620
.1606
.25
1.49
4.46
8.92
13.39
16.20
16.06
7
8
9
10
11
12
Total
f (x )
xf (x )
.1389 13.89
.1041 10.41
.0694
6.94
.0417
4.17
.0227
2.27
.0155
1.55
1.0000 100.00
18
Contoh Soal: Troy Parking Garage
• Poisson Distribution Goodness of Fit Test
– Observed and Expected Frequencies
i
0 or 1 or 2
3
4
5
6
7
8
9
10 or more
fi
5
10
14
20
12
12
9
8
10
ei
6.20
8.92
13.39
16.20
16.06
13.89
10.41
6.94
7.99
fi - ei
-1.20
1.08
.61
3.80
-4.06
-1.89
-1.41
1.06
2.01
19
Contoh Soal: Troy Parking Garage
• Poisson Distribution Goodness of Fit Test
– Test Statistic
2
2
2
(

1
.
20
)
(
1
.
08
)
(
2
.
01
)
2 

 ... 
 3. 42
6. 20
8. 92
7. 99
2
 .05
 14 . 07
– Rejection Rule
With  = .05 and k - p - 1 = 9 - 1 - 1 = 7 d.f.
(where
k
= number of categories and p =
number of population parameters estimated),
Reject H0 if 2 > 14.07
– Conclusion
We cannot reject H0. There’s no reason to doubt
the assumption of a Poisson distribution.
20
Goodness of Fit Test: Normal
Distribution
4. Compute the value of the test statistic.
2
(
f

e
)
2   i i
ei
i 1
k
5. Reject H0 if  
(where  is the significance level
and there are k - 3 degrees of freedom).
2
2

21
Contoh Soal: Victor
Computers
• Normal Distribution Goodness of Fit
Test
Victor Computers manufactures and
sells a
general purpose microcomputer. As
part of a study to evaluate sales
personnel, management wants to
determine if the annual sales volume
(number of units sold by a salesperson)
follows a normal probability distribution.
22
Contoh Soal: Victor Computers
• Normal Distribution Goodness of Fit Test
A simple random sample of 30 of the
salespeople was taken and their numbers of
units sold are below.
33
64
83
43
65
84
44
66
85
45
68
86
52
70
91
52
72
92
56
73
94
58 63 64
73 74 75
98 102 105
(mean = 71, standard deviation = 18.54)
23
Contoh Soal: Victor Computers
• Normal Distribution Goodness of Fit Test
– Hypotheses
H0: The population of number of
units sold has a normal
distribution with mean 71 and
standard deviation 18.54.
Ha: The population of number of
units sold does not have a
normal distribution with mean 71
and standard deviation 18.54. 24
Contoh Soal: Victor Computers
• Normal Distribution Goodness of Fit
Test
– Interval Definition
To satisfy the requirement of an
expected
frequency of at least 5 in each
interval we
will divide the normal distribution into
30/5 = 6
equal probability intervals.
25
Contoh Soal: Victor
Computers
• Normal Distribution Goodness of Fit Test
– Interval Definition
Areas
= 1.00/6
= .1667
53.02
71
88.98 = 71 + .97(18.54)
63.03 78.97
26
Contoh Soal: Victor
Computers
• Normal Distribution Goodness of Fit Test
– Observed and Expected Frequencies
i
fi
ei
fi – ei
Less than 53.02 6
53.02 to 63.03 3
63.03 to 71.00 6
71.00 to 78.97 5
78.97 to 88.98 4
More than 88.98
6
Total 30
5
5
5
5
5
5
30
1
-2
1
0
-1
1
27
Victor Computers
• Normal Distribution Goodness of Fit Test
– Test Statistic
2
2
2
2
2
2
(
1
)
(

2
)
(
1
)
(
0
)
(

1
)
(
1
)
2 





 1. 60
5
5
5
5
5
5
– Rejection Rule
With  = .05 and k - p - 1 = 6 - 2 - 1 = 3 d.f.,
 .205  7. 81
Reject H0 if 2 > 7.81
– Conclusion
We cannot reject H0. There is little evidence to
support rejecting the assumption the population
is normally distributed with  = 71 and  = 18.54.
28
• Selamat Belajar Semoga Sukses.
29
Download