Chapter 16 Tests of Goodness of Fit and Independence - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

Chapter 16 Tests of Goodness of Fit and Independence

Description:

Each home sold by Finger Lakes. Homes can be classified according ... Finger Lakes' manager would like to determine if. the price of the home and the style of ... – PowerPoint PPT presentation

Number of Views:80
Avg rating:3.0/5.0
Slides: 46
Provided by: johns574
Category:

less

Transcript and Presenter's Notes

Title: Chapter 16 Tests of Goodness of Fit and Independence


1
Chapter 16 Tests of Goodness of Fit and
Independence
  • Goodness of Fit Test A Multinomial Population
  • Test of Independence
  • Goodness of Fit Test Poisson
  • and Normal Distributions

2
Hypothesis (Goodness of Fit) Testfor Proportions
of 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.
3
Hypothesis (Goodness of Fit) Testfor Proportions
of a Multinomial Population
4. Compute the value of the test statistic.
where
fi observed frequency for category i
ei expected frequency for category i
k number of categories
Note The test statistic has a chi-square
distribution with k 1 df provided that the expe
cted frequencies are 5 or more for all categories
.
4
Hypothesis (Goodness of Fit) Testfor Proportions
of a Multinomial Population
5. Rejection rule
p-value approach
Reject H0 if p-value
Critical value approach
where ? is the significance level and
there are k - 1 degrees of freedom
5
Multinomial Distribution Goodness of Fit Test
  • Example Finger Lakes Homes (A)

Finger Lakes Homes manufactures
four models of prefabricated homes,
a two-story colonial, a log cabin, a
split-level, and an A-frame. To help
in production planning, management
would like to determine if previous
customer purchases indicate that there
is a preference in the style selected.
6
Multinomial Distribution Goodness of Fit Test
  • Example Finger Lakes Homes (A)

The number of homes sold of each
model for 100 sales over the past two
years is shown below.
Split-
A- Model Colonial Log Level Frame
Sold 30 20 35 15
7
Multinomial Distribution Goodness of Fit Test
  • Hypotheses

H0 pC pL pS pA .25
Ha The population proportions are not
pC .25, pL .25, pS .25, and pA .25
where pC population proportion that purchas
e a colonial pL population proportion that
purchase a log cabin pS population proporti
on that purchase a split-level
pA population proportion that purchase an
A-frame
8
Multinomial Distribution Goodness of Fit Test
  • Rejection Rule

Reject H0 if p-value 7.815.
With ? .05 and k - 1 4 - 1 3 d
egrees of freedom
Do Not Reject H0
Reject H0
?2
7.815
9
Multinomial Distribution Goodness of Fit Test
  • Expected Frequencies
  • Test Statistic

e1 .25(100) 25 e2 .25(100) 25
e3 .25(100) 25 e4 .25(100) 25
1 1 4 4 10
10
Multinomial Distribution Goodness of Fit Test
  • Conclusion Using the p-Value Approach

Chi-Square with 3 DF x P( X  10 0.981434
So, with c2 10 and 3 df, the area in the
upper tail of the distribution is 0.018566
The p-value hypothesis.
11
Multinomial Distribution Goodness of Fit Test
  • Conclusion Using the Critical Value Approach

c2 10 7.815
We reject, at the .05 level of significance,
the assumption that there is no home style
preference.
12
Using MTB
13
(No Transcript)
14
(No Transcript)
15
Test of Independence Contingency Tables
1. Set up the null and alternative hypotheses.
2. Select a random sample and record the
observed frequency, fij , for each cell of
the contingency table.
3. Compute the expected frequency, eij , for
each cell.
16
Test of Independence Contingency Tables
4. Compute the test statistic.
5. Determine the rejection rule.
where ? is the significance level and,
with n rows and m columns, there are
(n - 1)(m - 1) degrees of freedom.
17
Contingency Table (Independence) Test
  • Example Finger Lakes Homes (B)

Each home sold by Finger Lakes
Homes can be classified according to
price and to style. Finger Lakes
manager would like to determine if
the price of the home and the style of
the home are independent variables.
18
Contingency Table (Independence) Test
  • Example Finger Lakes Homes (B)

The number of homes sold for
each model and price for the past two
years is shown below. For convenience,
the price of the home is listed as either
99,000 or less or more than 99,000.
Price Colonial Log Split-Level
A-Frame
12
99,000 12 14 16
3
19
Contingency Table (Independence) Test
  • Hypotheses

H0 Price of the home is independent of the
style of the home that is purchased
Ha Price of the home is not independent of the
style of the home that is purchased
20
Contingency Table (Independence) Test
  • Expected Frequencies

Price Colonial Log Split-Level
A-Frame Total
99K Total
18 6 19
12 55
12 14 16
3 45
30 20 35
15 100
21
Contingency Table (Independence) Test
  • Rejection Rule

Reject H0 if p-value 7.815
  • Test Statistic

.1364 2.2727 . . . 2.0833 9.149
22
Contingency Table (Independence) Test
  • Conclusion Using the p-Value Approach

0.972626 1-0.972626 0.027374
Area in Upper Tail
c2 Value (df 3)
With c2 9.145 the area in the upper tail of
the distribution is 0.027374.
The p-value hypothesis.
23
Contingency Table (Independence) Test
  • Conclusion Using the Critical Value Approach

c2 9.145 7.815
We reject, at the .05 level of
significance, the assumption that the price of th
e home is independent of the style of home that i
s purchased.
24
Goodness of Fit Test Poisson Distribution
  • 1. Set up the null and alternative hypotheses.
  • H0 Population has a Poisson probability
    distribution
  • Ha Population does not have a Poisson
    distribution

2. Select a random sample and
a. Record the observed frequency fi for
each value of the Poisson random varia
ble. b. Compute the mean number of occurre
nces ?.
3. Compute the expected frequency of
occurrences ei for each value of the Pois
son random variable.
25
Goodness of Fit Test Poisson Distribution
  • 4. Compute the value of the test statistic.

where
fi observed frequency for category i
ei expected frequency for category i
k number of categories
26
Goodness of Fit Test Poisson Distribution
5. Rejection rule
Reject H0 if p-value
p-value approach
Critical value approach
where ? is the significance level and
there are k - 2 degrees of freedom
27
Goodness of Fit Test Poisson Distribution
  • Example Troy Parking Garage

In studying the need for an
additional entrance to a city
parking garage, a consultant has recommended an
analysis approach that is applicable only in si
tuations where the number of cars
entering during a specified time period follows
a Poisson distribution.
28
Goodness of Fit Test Poisson Distribution
  • Example Troy Parking Garage
  • 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
29
Goodness of Fit Test Poisson Distribution
  • 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
30
Goodness of Fit Test Poisson Distribution
  • Estimate of Poisson Probability Function

?otal Arrivals 0(0) 1(1) 2(4) . . .
12(1) 600
Estimate of ? 600/100 6
Total Time Periods 100
Hence,
31
Goodness of Fit Test Poisson Distribution
  • Expected Frequencies

x f (x ) nf (x )
x f (x ) nf (x )
0 1 2 3 4 5 6
7 8 9 10 11 12 Total
13.77 10.33 6.88 4.13 2.25
2.01
100.00
.1377 .1033 .0688 .0413 .0225 .02
01
1.0000
.0025 .0149 .0446 .0892 .1339 .1606 .1606
.25 1.49 4.46 8.92 13.39 16.06 16.
06
32
Goodness of Fit Test Poisson Distribution
  • Observed and Expected Frequencies

i fi
ei fi - ei
-1.20 1.08 0.61 3.94 -4.06 -1.77 -1.33
1.12
1.61
5 10 14 20 12 12 9 8 10
6.20 8.92 13.39 16.06 16.06 13.77 10.33
6.88 8.39
0 or 1 or 2 3 4 5
6
7 8 9 10 or more
33
Goodness of Fit Test Poisson Distribution
  • Rejection Rule

Reject H0 if p-value 14.067.
  • Test Statistic

34
Goodness of Fit Test Poisson Distribution
  • Conclusion Using the p-Value Approach

Area in Upper Tail 0.140847
c2 Value (df 7) 1-0.140847 0.859
With c2 3.268 the area in the upper tail
of the distribution is 0.859.
The p-value a . We cannot reject the null
hypothesis. There is no reason to doubt the
assumption of a Poisson distribution.
35
Goodness of Fit Test Normal Distribution
  • 1. Set up the null and alternative hypotheses.

2. Select a random sample and
a. Compute the mean and standard deviation.
b. Define intervals of values so that the
expected frequency is at least 5 for each
interval. c. For each interval record the obs
erved frequencies
3. Compute the expected frequency, ei , for
each interval.
36
Goodness of Fit Test Normal Distribution
  • 4. Compute the value of the test statistic.

37
Normal Distribution Goodness of Fit Test
  • Example IQ Computers

IQ Computers (one better than HP?)
manufactures and sells a general
purpose microcomputer. As part of
a study to evaluate sales personnel, management
wants to determine, at a .05 significance level,
if the annual sales volume (number of units sold
by a salesperson) follows a normal probability di
stribution.
38
Normal Distribution Goodness of Fit Test
  • Example IQ Computers
  • A simple random sample of 30 of
  • the salespeople was taken and their
  • numbers of units sold are below.

33 43 44 45 52 52 56 58
63 64 64 65 66 68 70 72 73
73 74 75 83 84 85 86 91 92
94 98 102 105
(mean 71, standard deviation 18.54)
39
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.
40
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.
41
Normal Distribution Goodness of Fit Test
  • Interval Definition

Areas 1.00/6 .1667
71
53.02
88.98 71 .97(18.54)
71 - .43(18.54) 63.03
78.97
42
Normal Distribution Goodness of Fit Test
  • Observed and Expected Frequencies

i fi
ei fi - ei
1 -2 1 0 -1 1
5 5 5 5 5 5 30
6 3 6 5 4 6 30
Less than 53.02 53.02 to 63.03 63.03 to 71.0
0 71.00 to 78.97 78.97 to 88.98 More than 8
8.98
Total
43
Normal Distribution Goodness of Fit Test
  • Rejection Rule

Reject H0 if p-value 7.815.
  • Test Statistic

44
Normal Distribution Goodness of Fit Test
  • Conclusion Using the p-Value Approach

0.340610 1 - 0.340610 0.65939
Area in Upper Tail
c2 Value (df 3)
Since c2 1.600, the area in the upper
tail
of the distribution is 0.65939
The p-value a . We cannot reject the null
hypothesis. There is little evidence to support
rejecting the assumption the population is
normally distributed with ? 71 and ? 18.54.
45
End of Chapter 16
Write a Comment
User Comments (0)
About PowerShow.com