University SLIDES BY Chapter 12 Comparing Multiple Proportions Test of Independence and Goodness of Fit Testing the Equality of Population Proportions ID: 629610
Download Presentation The PPT/PDF document "John Loucks St . Edward’s" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
John Loucks
St
. Edward’s
University
.
.
.
.
.......
SLIDES
.
BYSlide2
Chapter 12 Comparing Multiple Proportions,Test of Independence and Goodness of Fit Testing the Equality of Population Proportions for Three or More Populations Goodness of Fit Test
Test of IndependenceSlide3
Comparing Multiple Proportions,Test of Independence and Goodness of FitIn this chapter we introduce three additional hypothesis-testing procedures.The test statistic and the distribution used are based on the chi-square (c2) distribution.
In all cases, the data are categorical.Slide4
Using the notation p1 = population proportion for population 1 p2 = population proportion for population 2 and pk = population proportion for population k
H
0
: p1 = p2 = . . . = pk Ha: Not all population proportions are equal
Testing the Equality of Population Proportions for Three or More PopulationsThe hypotheses for the equality of population proportions for k > 3 populations are as follows:Slide5
If H0 cannot be rejected, we cannot detect a difference among the k population proportions.If H0 can be rejected, we can conclude that not all k population proportions are equal.
Further analyses can be done to conclude which population proportions are significantly different from others.
Testing the Equality of Population
Proportions for Three or More PopulationsSlide6
Example: Finger Lakes Homes Finger Lakes Homes manufactures three models ofprefabricated homes, a two-story colonial, a log cabin,and an A-frame. To help in product-line planning, management
would like to compare the customers
atisfaction with the three home styles.
Testing the Equality of Population Proportions for Three or More Populations p1 = proportion likely to repurchase a Colonial for the population of Colonial owners p2 = proportion likely to repurchase a Log Cabin
for the population of Log Cabin owners p3 = proportion likely to repurchase an A-Frame for the population of A-Frame ownersSlide7
We begin by taking a sample of owners from each of the three populations.Each sample contains categorical data indicatingwhether the respondents are likely or not likely torepurchase the home.Testing the Equality of Population
Proportions for Three or More PopulationsSlide8
Home Owner Colonial Log A-Frame TotalLikely to Yes 100 81 83 264
Repurchase No
35
20 41 96 Total 135 101 124 360Observed Frequencies (sample results)Testing the Equality of Population Proportions for Three or More PopulationsSlide9
Next, we determine the expected frequencies under the assumption H0 is correct.If a significant difference exists between the observed and expected frequencies, H0 can be rejected.
Testing the Equality of Population Proportions
for Three or More Populations
Expected Frequencies
Under the Assumption H0 is TrueSlide10
Testing the Equality of Population Proportions for Three or More Populations Home Owner Colonial
Log A-Frame Total
Likely to
Yes 99.00 74.07 90.93 264Repurchase No 36.00 26.93 33.07 96 Total 135 101 124 360Expected Frequencies (computed)Slide11
Next, compute the value of the chi-square test statistic.
Note
: The test statistic has a chi-square
distribution with k – 1 degrees of freedom, provided the expected frequency is 5 or more for each cell.fij = observed frequency for the cell in row i and column j
eij = expected frequency for the cell in row i and column junder the assumption H0 is true where:Testing the Equality of Population Proportions for Three or More PopulationsSlide12
Obs.Exp. Sqd.Sqd. Diff. /Likely to
HomeFreq.
Freq.
Diff.Diff.Exp. Freq.Repurch.Ownerfijeij
(fij - eij)(fij - eij)2(fij - eij)
2/eijYesColonial9797.50-0.500.25000.0026
YesLog Cab.8372.9410.06101.11421.3862YesA-Frame8089.56-9.5691.3086
1.0196NoColonial3837.500.500.25000.0067NoLog Cab.1828.06
-10.06101.11423.6041NoA-Frame4434.449.5691.30862.6509 Total
360360 c2 = 8.6700Testing the Equality of Population Proportions for Three or More Populations
Computation of the Chi-Square Test Statistic.Slide13
where is the significance level andthere are k - 1 degrees of freedomp
-value approach:Critical value approach:
Reject
H0 if p-value < aRejection Rule
Reject H0 if Testing the Equality of Population Proportions for Three or More PopulationsSlide14
Rejection Rule (using a = .05)
2
5.991
Do Not Reject H0Reject H0
With = .05 and k - 1 = 3 - 1 = 2 degrees of freedom Reject
H0 if p-value < .05 or c2 > 5.991Testing the Equality of Population Proportions for Three or More PopulationsSlide15
Conclusion Using the p-Value Approach The p-value < a
. We can reject the null hypothesis.
Because
c2 = 8.670 is between 9.210 and 7.378, the area in the upper tail of the distribution is between .01 and .025.Area in Upper Tail .10 .05 .025 .01 .005
c2 Value (df = 2) 4.605 5.991 7.378 9.210 10.597
Actual p-value is .0131Testing the Equality of Population Proportions for Three or More PopulationsSlide16
Testing the Equality of Population Proportions for Three or More PopulationsWe have concluded that the population proportions for the three populations of home owners are not equal.To identify where the differences between population proportions exist, we will rely on a multiple comparisons procedure.Slide17
Multiple Comparisons ProcedureWe begin by computing the three sample proportions.We will use a multiple comparison procedure known as the Marascuillo procedure.Slide18
Multiple Comparisons ProcedureMarascuillo ProcedureWe compute the absolute value of the pairwise difference between sample proportions.
Colonial and Log Cabin:
Colonial and A-Frame:
Log Cabin and A-Frame:Slide19
Multiple Comparisons ProcedureCritical Values for the Marascuillo Pairwise Comparison
For each pairwise comparison compute a critical value as follows:
For
a = .05 and k = 3: c2 = 5.991Slide20
Multiple Comparisons Procedure
CV
ij
Significant ifPairwise Comparison> CVijColonial vs. Log CabinColonial vs. A-FrameLog Cabin vs. A-Frame.061
.072.133.0923.0971.1034Not SignificantNot SignificantSignificantPairwise Comparison Tests Slide21
Test of Independence
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.
H0: The column variable is independent of the row variableHa: The column variable is not independent of the row variableSlide22
Test of Independence
5.
Determine the rejection rule.
Reject H0 if p -value < a or .
4. Compute the test statistic.where is the significance level and,with n rows and m columns, there are(n - 1)(
m - 1) degrees of freedom.Slide23
Each home sold by Finger Lakes Homes can beclassified according to price and to style. FingerLakes’ manager would like to determine if theprice of the home and the style of the home areindependent variables.Test of Independence
Example: Finger Lakes Homes (B)Slide24
Price Colonial Log Split-Level A-Frame The number of homes sold for each model andprice for the past two years is shown below. Forconvenience, the price of the home is listed as either
$99,000 or less or more than $99,000
.
> $99,000 12 14 16 3< $99,000 18 6 19 12Test of Independence Example: Finger Lakes Homes (B)Slide25
HypothesesTest of IndependenceH0: Price of the home is
independent of the style of the home that is purchased
H
a: Price of the home is not independent of the style of the home that is purchasedSlide26
Expected Frequencies
Test of Independence
Price
Colonial Log Split-Level A-Frame Total< $99K> $99K Total30 20 35 15 10012 14 16 3 4518 6 19 12 55Slide27
Rejection RuleTest of Independence
With
= .05 and (2 - 1)(4 - 1) = 3 d.f.,Reject H0 if p-value < .05 or 2 > 7.815
= .1364 + 2.2727 + . . . + 2.0833 = 9.149Test StatisticSlide28
Conclusion Using the p-Value Approach The p-value < a
. We can reject the null hypothesis. Because
c
2 = 9.145 is between 7.815 and 9.348, the area in the upper tail of the distribution is between .05 and .025.Area in Upper Tail .10 .05 .025 .01 .005c2 Value (df = 3) 6.251 7.815 9.348 11.345 12.838
Test of IndependenceActual p-value is .0274Slide29
Conclusion Using the Critical Value ApproachTest of Independence
We reject, at the .05 level of significance,
the assumption that the price of the home is
independent of the style of home that ispurchased.c2 = 9.145 > 7.815Slide30
Goodness of Fit Test:Multinomial Probability Distribution1. State the null and alternative hypotheses.
H
0
: The population follows a multinomial distribution with specified probabilities for each of the k categoriesHa: The population does not follow a multinomial distribution with specified probabilities for each of the k categoriesSlide31
Goodness of Fit Test:Multinomial Probability Distribution2. 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.Slide32
Goodness of Fit Test:Multinomial Probability Distribution
4.
Compute the value of the test statistic.
Note
: The test statistic has a chi-square distribution with k – 1 df provided that the expected frequencies are 5 or more for all categories.fi = observed frequency for category ie
i = expected frequency for category ik = number of categorieswhere:Slide33
Goodness of Fit Test:
Multinomial Probability Distribution
where
is the significance level andthere are k - 1 degrees of freedomp-value approach:Critical value approach:
Reject H0 if p-value < a
5. Rejection rule:Reject H0 if Slide34
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 apreference in the style selected.Slide35
Split- A-Model Colonial Log Level Frame# Sold 30 20 35 15
The number of homes sold of each model for 100
sales over the past two years is shown below.
Multinomial Distribution Goodness of Fit Test Example: Finger Lakes Homes (A)Slide36
HypothesesMultinomial Distribution Goodness of Fit Test
where:
p
C = population proportion that purchase a colonial pL = population proportion that purchase a log cabin pS = population proportion that purchase a split-level pA = population proportion that purchase an A-frameH
0: pC = pL = pS = pA = .25Ha: The population proportions are not pC = .25, pL
= .25, pS = .25, and pA = .25Slide37
Rejection Rule
2
7.815
Do Not Reject
H
0Reject H0
Multinomial Distribution Goodness of Fit Test
With = .05 and k - 1 = 4 - 1 = 3 degrees of freedom Reject H0 if p-value <
.05 or c2 > 7.815.Slide38
Expected Frequencies
Test Statistic
Multinomial Distribution Goodness of Fit Test
e
1 = .25(100) = 25 e2 = .25(100) = 25 e3 = .25(100) = 25 e4 = .25(100) = 25
= 1 + 1 + 4 + 4 = 10Slide39
Multinomial Distribution Goodness of Fit TestConclusion Using the p-Value Approach
The
p
-value < a . We can reject the null hypothesis. Because c2 = 10 is between 9.348 and 11.345, the area in the upper tail of the distribution is between .025 and .01.
Area in Upper Tail .10 .05 .025 .01 .005c2 Value (df = 3) 6.251 7.815 9.348 11.345 12.838Slide40
Conclusion Using the Critical Value ApproachMultinomial Distribution Goodness of Fit Test
We reject, at the .05 level of significance,
the assumption that there is no home style
preference.c2 = 10 > 7.815Slide41
Goodness of Fit Test: Normal Distribution1. State the null and alternative hypotheses.Compute the expected frequency, ei , for each interval. (Multiply the sample size by the probability of a
normal random variable being in the interval.
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 observed frequenciesH0: The population has a normal distribution
Ha: The population does not have a normal distributionSlide42
4. Compute the value of the test statistic.Goodness of Fit Test: Normal Distribution
5. Reject
H0
if (where is the significance level and there are k - 3 degrees of freedom).Slide43
Example: IQ Computers IQ Computers (one better than HP?) manufacturesand sells a general purpose microcomputer. As partof a study to evaluate sales personnel, managementwants to determine, at a .05 significance level, if theannual sales volume (number of units sold by asalesperson) follows a normal probabilitydistribution.Goodness of Fit Test: Normal DistributionSlide44
A simple random sample of 30 of the salespeoplewas taken and their numbers of units sold are listedbelow.Example: IQ Computers(mean = 71, standard deviation = 18.54)33 43 44 45 52 52 56 58 63 64
64 65 66 68 70 72 73 73 74 7583 84 85 86 91 92 94 98 102 105
Goodness of Fit Test: Normal DistributionSlide45
HypothesesHa: The population of number of units sold does not have a normal distribution with mean 71 and standard deviation 18.54.H0: The population of number of units sold
has a normal distribution with mean 71 and standard deviation 18.54.Goodness of Fit Test: Normal DistributionSlide46
Interval Definition To satisfy the requirement of an expectedfrequency of at least 5 in each interval we willdivide the normal distribution into 30/5 = 6equal probability intervals.Goodness of Fit Test: Normal DistributionSlide47
Interval Definition
Areas
= 1.00/6
= .1667
71
53.02
71 - .43(18.54) = 63.0378.97
88.98 = 71 + .97(18.54)Goodness of Fit Test: Normal DistributionSlide48
Observed and Expected Frequencies 1-2 1 0-1 1
5
5
5 5 5 530 6 3 6 5 4 630Less than 53.02 53.02 to 63.03 63.03 to 71.00 71.00 to 78.97
78.97 to 88.98More than 88.98 i fi ei fi - eiTotalGoodness of Fit Test: Normal DistributionSlide49
Test Statistic
With
= .05 and
k - p - 1 = 6 - 2 - 1 = 3 d.f.(where k = number of categories and p = numberof population parameters estimated), Reject H0
if p-value < .05 or 2 > 7.815.Rejection RuleGoodness of Fit Test: Normal DistributionSlide50
Conclusion Using the p-Value Approach 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.
Because
c2 = 1.600 is between .584 and 6.251 in the Chi-Square Distribution Table, the area in the upper tailof the distribution is between .90 and .10. Area in Upper Tail .90 .10 .05 .025 .01 c2 Value (df = 3) .584 6.251 7.815 9.348 11.345
Goodness of Fit Test: Normal DistributionActual p-value is .6594Slide51
End of Chapter 12