Hypothesis Test (Two Populations)

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 22

HYPOTHESIS TEST

(TWO
POPULATIONS)
Outline

MC NEMAR TEST SIGN TEST

WILCOXON TEST
MC NEMAR TEST
General Description
◦ In this section we present the method of using McNemar’s test for testing the null hypothesis that the frequencies from the
discordant (different) categories occur in the same proportion.
◦ McNemar’s Test uses frequency counts from matched pairs of nominal data from two categories to test the null hypothesis that
for a 2 x 2 table such as in table 1, the frequencies b and c occur in the same proportion.

After
Option 1 Option 2
Before Option 1 a b
Option 2 c d
Requirements
◦ The sample data have been randomly selected.
◦ The sample data consist of matched pairs of frequency counts.
◦ The data are at the nominal level of measurement, and each observation can be classified two ways:
◦ (1) According to the category distinguishing values with each matched pair, and
◦ (2) According to another category with two possible values.

◦ the frequencies are such that b + c ≥ 10 (total discordant ≥ 10)


Hypothesis and Test
◦ Hypothesis:
◦ H0: The proportions of the frequencies b and c (as in Table 11-9) are the same.

◦ H1: The proportions of the frequencies b and c (as in Table 11-9) are different.

◦ Test Statistics:
2
◦ Critical Value:
𝜒 =¿ ¿
◦ The critical region is located in the right tail only.
◦ The critical values are found in Table Chi-square by using degrees of freedom = 1.
SIGN TEST
General Description
◦ The sign test is a nonparametric (distribution free) test that uses plus and minus signs to test different claims,
including:
◦ Claims involving matched pairs of sample data;
◦ Claims involving nominal data;
◦ Claims about the median of a single population.
◦ The basic idea underlying the sign test is to analyze the frequencies of the plus and minus signs to determine whether
they are significantly different.
◦ Requirement: The sample data have been randomly selected.
◦ Claims Involving Matched Pairs: When using the sign test with data that are matched pairs, we convert the raw data to
plus and minus signs as follows:
◦ Subtract each value of the second variable from the corresponding value of the first variable.
◦ Record only the sign of the difference found in step 1. Exclude ties: that is, any matched pairs in which both
values are equal.
Hypothesis and Test Statistics
◦ Hypothesis:
◦ H0: The median of the differences is equal to 0.
◦ H1: The median of the differences is not equal to 0.

◦ Test Statistics:
◦ For n ≤ 25 : x (the number of times the less frequent sign occurs)
◦ For n > 25:

◦ Critical Value:
◦ For n ≤ 25 : critical x values are in Sign Test Table
◦ For n > 25: critical values are in Normal Distribution Table

◦ Caution:
◦ When applying the sign test in a one-tailed test, we need to be very careful to avoid making the wrong conclusion when one sign
occurs significantly more often than the other, but the sample data contradict the alternative hypothesis. See the following
example.
WILCOXON SIGNED-RANKS TEST
FOR MATCHED PAIRS
General Description
◦ The Wilcoxon signed-ranks test involves the conversion of the sample data ranks. This test can be used for two
different applications.
◦ The Wilcoxon signed-ranks test is a nonparametric test that uses ranks for these applications:
◦ Test a null hypothesis that the population of matched pairs has differences with a median equal to zero.
◦ Test a null hypothesis that a single population has a claimed value of the median.

◦ Requirements
◦ The data consist of matched pairs that have been randomly selected.
◦ The population of differences (found from the pairs of data) has a distribution that is approximately symmetric, meaning that the
left half of its histogram is roughly a mirror image of its right half. (There is no requirement that the data have a normal
distribution.)
Hypothesis and Test Statistics
◦ Hypothesis:
◦ H0: The matched pairs have differences that come from a population with a median equal to zero.
◦ H1: The matched pairs have differences that come from a population with a nonzero median.

◦ Test Statistics
◦ For n ≤ 30, the test statistic is T.
◦ For n > 30 :

◦ T = the smaller of the following two sums:


◦ The sum of the positive ranks of the nonzero differences d
◦ The absolute value of the sum of the negative ranks of the nonzero differences d

◦ Critical Value:
◦ For n ≤ 30 : critical value as in Wilcoxon Matched Pairs Signed-Ranks Test’s Table
◦ For n > 30 : critical values are in Normal Distribution Table
Hypothesis and Test Statistics (2)
Procedure for Finding the Value of the Test Statistic
◦ Step 1: For each pair of data, find the difference d by subtracting the second value from the first. Keep the signs, but discard any
pairs for which d = 0.
◦ Step 2: Ignore the signs of the differences, then sort the differences from lowest to highest and replace the differences by the
corresponding rank value. When differences have the same numerical value, assign to them the mean of the ranks involved in the tie.
◦ Step 3: Attach to each rank the sign difference from which it came. That is, insert those signs that were ignored in step 2.
◦ Step 4:Find the sum of the absolute values of the negative ranks. Also find the sum of the positive ranks.
◦ Step 5: Let T be the smaller of the two sums found in Step 4. Either sum could be used, but for a simplified procedure we arbitrarily
select the smaller of the two sums.
◦ Step 6:Let n be the number of pairs of data for which the difference d is not 0.
◦ Step 7:Determine the test statistic and critical values based on the sample size, as shown above.
◦ Step 8:When forming the conclusion, reject the null hypothesis if the sample data lead to a test statistic that is in the critical region that
is, the test statistic is less than or equal to the critical value(s). Otherwise, fail to reject the null hypothesis.
APPLICATIONS
McNemar Test
◦ Case 1:
Sekelompok orang awan politik diwawancarai tentang sikap politik mereka setelah pemilihan presiden di negara RSA, apakah
mereka mendukung atau tidak mendukung petahana. Seminggu setelah interview tersebut, ternyata terjadi kerusuhan di ibukota
negara akibat provokasi dari petahan yang ternyata kalah pemilu. Kerusuhan tersebut menimbulkan dampak yangcukup parah
terhadap citra negara tersebut di dunia internasional. Lembaga survei tersebut kemudian mewawancarai kembali responden
minggu sebelumnya untuk melihat efek kerusuhan tersebut terhadap pendapat mereka. Hasilnya adalah sebagai berikut:

  Setelah kasus

Mendukung Tidak mendukung

Sebelum kasus Mendukung 10 100

Tidak mendukung 80 110


McNemar Test (2)
◦ Case 2:
◦ A researcher wanted to investigate the impact of an intervention on smoking. In this hypothetical study, 50 participants were
recruited to take part, consisting of 25 smokers and 25 non-smokers. All participants watched an emotive video showing the
impact that deaths from smoking-related cancers had on families. Two weeks after this video intervention, the same
participants were asked whether they remained smokers or non-smokers. After the intervention, there is 16 new-non-smokers
and 5-new-smokers. Is there any significant changes before and after intervention?
Sign Test
◦ Case 1:
◦ Table 13-3 includes some of the weights listed in Data Set 3 in Appendix B. Those weights were measured from college
students in September and April of their freshman year. Use the sample data in Table 13-3 with a 0.05 significance level to test
the claim that there is no difference between the September weights and the April weights. Use the sign test.
Sign Test (2)
◦ This set of data represents test scores at the end of Spring and the beginning of the Fall semesters. The hypothesis is that the
summer break means a significant drop in test scores.
Wilcoxon Test
Case 1:
◦ The first two rows of Table 13-4 include some of the weights from Data Set 3 in Appendix B. Those weights were measured
from college students in September and April of their freshman year. Use the sample data in the first two rows of Table 13-4 to
test the claim that there is no difference between the September weights and the April weights. Use the Wilcoxon signed-ranks
test with a 0.05 significance level.
Wilcoxon Test (2)
Systolic Blood Pressure Systolic Blood Pressure
◦ Case 2: Patient
Before Exercise Program After Exercise Program

A study is run to evaluate the effectiveness of an exercise


1 125 118
program in reducing systolic blood pressure in patients 2 132 134
with pre-hypertension (defined as a systolic blood 3 138 130
pressure between 120-139 mmHg or a diastolic blood 4 120 124

pressure between 80-89 mmHg). A total of 15 patients 5 125 105


6 127 130
with pre-hypertension enroll in the study, and their
7 136 130
systolic blood pressures are measured. Each patient then 8 139 132
participates in an exercise training program where they 9 131 123
learn proper techniques and execution of a series of 10 132 128

exercises. Patients are instructed to do the exercise 11 135 126


12 136 140
program 3 times per week for 6 weeks. After 6 weeks,
13 128 135
systolic blood pressures are again measured. The data are 14 127 126
shown below. 15 130 132
References
◦ Triola, M. F. (2012). Elementary statistics. Pearson Learning Solutions.
◦ Lindstrom, D. (2010). Schaum’s Easy Outline of Statistics, Second Edition (Schaum’s Easy Outlines) 2nd Edition. McGraw-
Hill Education
MATUR SUKSMA

You might also like