Sunteți pe pagina 1din 31

Procedures in Hypothesis Testing

1. State the null hypothesis and alternative


hypothesis.
2. Choose the level of significance.
3. Select appropriate test statistic.
4. Determine the critical values that divide the
rejection and nonrejection regions (if the
decision is to be based on P value it is not
necessary to state the critical region).
5. Compute for the value of the test statistic from
the sample data.
6. Make a statistical decision.
7. State the conclusion.
SAMPLE PROBLEMS
Situation 1

As an aid for improving employees working habits,


eight employees were randomly selected to attend a
seminar-workshop on the importance of work. The
table shows the number of workload done per week
before and after the seminar-workshop. At 0.05
alpha level, was there a significant difference in the
performance level of employees before and after the
seminar-workshop?

Before 14 13 9 9 10 10 12 7
After 11 15 10 14 14 13 11 12
Solution/Procedure

STEP 1.
Ho: There is no significant difference in the performance
level of employees before and after the seminar-workshop.
(µ𝐵 = µ𝐴 )

Ha: There is a significant difference in the performance


level of employees before and after the seminar-workshop.
(µ𝐵 ≠ µ𝐴 )
Step 2. The level of significance is  = 0.05.

Step 3. Test statistic is Paired sample t – test

Step 4. Determine the degrees of freedom and


the critical region
df = n – 1 = 8 – 1 = 7 and t critical = 2.365
Step 5. Computation of t value for paired samples.

Before (x1) After (X2) D = X2 – X1 𝑫𝟐


14 11 -3 9
13 15 2 4
9 10 1 1
9 14 5 25
10 14 4 16
10 13 3 9
12 11 -1 1
7 12 5 25
ƩD = 16 Ʃ𝑫𝟐 = 90
Continuation…
• Determine the mean of the differences.
σ𝐷 16

𝐷= = =2
𝑁 8

• Determine the standard deviation of the differences.

2 σ𝐷 2 16 2
σ𝐷 − 90 −
𝑛 8
𝑠𝐷 = = = 2.878
𝑛−1 8−1

• Determine the test value


ഥ − µ𝐷
𝐷 2 −0
t= 𝑆𝐷 = 2.878 = 1.966
ൗ 𝑛 ൗ 8
PAIRED T-TEST
Step 6. Decision Rule
Since the computed t value of 1.966 is less than the
t critical of 2. 365 at level of significance of 0.05, the
statistical decision is not to reject the null hypothesis.

Step 7. Conclusion.
Since we do not reject the Ho, we can conclude that
there is no significant difference in the performance level
of employees before and after the seminar-workshop.
Situation 2
A pig farmer wants to test two different diets
designed to maximize weight gain. The farmer
randomly selects 8 pigs and divides them randomly
into two groups, four pigs each. Each group is given
one of the diets. The weight gains, in pounds, after a
three-week period are shown below.

Diet 1 10.5 10.9 10.7 10.3


Diet 2 11.5 10.9 11.8 11.8
Solution/Procedure

STEP 1.
Ho: There is no significant difference in the weight gains
of the pigs in Diet 1 and Diet 2.
(µ1 = µ2 )

Ha: There is a significant difference in the weight gains


of the pigs in Diet 1 and Diet 2.
(µ1 ≠ µ2 )
Step 2. The level of significance is  = 0.05.

Step 3. Test statistic is Independent sample t – test

Step 4. Determine the degrees of freedom and


the critical region
df = n1 + n2 - 2 = 4+4-2 = 6 and t critical = 2.447
Step 5. Computation of t value for paired samples.
Diet 1 (x1) Diet 2 (X2)
S ഥ𝟏 = 10.6
𝒙 ഥ𝟐 = 11.5
𝒙
10.5 11.5
S = 0.2582 S = 0.4243
10.9 10.9
  = 0.2236  = 0.3674
10.7 11.8
10.3 11.8 𝑥ҧ 1 − 𝑥ҧ2
t= 1 1
= -3.624
∑x1 = 42.4 ∑x2 = 46 𝑠𝑝 +
𝑛1 𝑛2

𝒏𝟏 −𝟏 𝒔𝟏 𝟐 + 𝒏𝟐 −𝟏 𝒔𝟐 𝟐
SP = 𝒏𝟏 +𝒏𝟐 −𝟐
= 0.35121
INDEPENDENT SAMPLE T-TEST
Step 6. Decision Rule
Since the computed t value of -3.624 is greater
than the t critical of 2. 447 at level of significance of
0.05, the statistical decision is to reject the null hypothesis.

Step 7. Conclusion.
Since we reject the Ho, we can conclude that there
is a significant difference in the weight gain of the pigs
from Diet 1 and Diet 2.
T- TEST FOR INDEPENDENT SAMPLES
SOME STATISTICAL SOFTWARE
Paired T-test
• Determine the mean of the differences.
σ𝐷

𝐷=
𝑁

• Determine the standard deviation of the differences.

2 σ𝐷 2
σ𝐷 −
𝑛
𝑠𝐷 =
𝑛−1

• Determine the test value


ഥ − µ𝐷
𝐷
t= 𝑆𝐷
ൗ 𝑛
T – test for independent samples

𝑥ҧ 1 − 𝑥ҧ 2
t= 1 1
𝑠𝑝 +
𝑛1 𝑛2

𝒏𝟏 −𝟏 𝒔𝟏 𝟐 + 𝒏𝟐 −𝟏 𝒔𝟐 𝟐
SP =
𝒏𝟏 +𝒏𝟐 −𝟐
Parametric Nonparametric
Purpose of Test (Random (Non-random
sampling) sampling)
Significant difference T –test (Independent Mann – Whitney U
between 2 groups samples) test
Paired samples Paired t – test Wilcoxon Signed -
Rank Test
Degree of association Pearson’s r (Pearson’s Spearman’s rho
between the two product-moment (spearman rank
variables correlation coefficient) correlation)
Difference between chi-square test Chi-square goodness-
categorical variables (Pearson’s chi-square of-fit test
test)
Significant difference One – way Analysis Kruskal Wallis Test
between 3 or more of Variance (ANOVA)
groups
Situation 3
A consumer agency wanted to find out if the mean time it takes for
each of the three brands of medicines to provide relief from a
headache is the same. The first drug was administered to six randomly
selected patients, the second to four randomly selected patients, and
the third to five randomly selected patients. The following table gives
the time (in minutes) taken by each patient to get relief from a
headache after taking the medicine.
Drug I Drug II Drug III
25 15 44
38 21 39
42 19 54
65 25 58
47 73
52

At the 2.5% significance level, will you conclude that the mean time
taken to provide relief from a headache is the same for each of the
three drugs?
Ho: The mean time it takes for each of the
three brands of medicines to provide relief
from a headache is the same.

µ1 = µ2 = µ3
Drug1 Drug 2 Drug3
25 15 44
38 21 39 2
(σ 𝑥)
2
42 19 54 𝑆𝑆 = ෍ 𝑥 −
𝑛
65 25 58
47 73 For Drug 1:
52 2692
𝑆𝑆 = 12971 −
6
= 910.83
Drug 1 Drug 2 Drug 3 Total
σ 𝒙 = 𝟔𝟏7
෍ 𝒙 = 𝟐𝟔𝟗 ෍ 𝒙 = 𝟖𝟎 ෍ 𝒙 = 𝟐𝟔𝟖

n=6 n=4 n=5 N= 15


𝐱ത = 𝟒𝟒. 𝟖𝟑 𝐱ത = 𝟐𝟎 𝐱ത=53.6 𝐱ത=41.13

෍ 𝑥 2 = 29689
෍ 𝑥2 = 𝟏𝟐𝟗𝟕𝟏 σ 𝑥2 =1652 σ 𝑥2 =15066

SS= 910.83 SS= 52 SS= 701.2


SUMMARY OF ANOVA TABLE
Source df SS MS F
Between k-1 𝑆𝑆𝑏 𝑆𝑆𝑏 ÷ 𝑑𝑓 𝑀𝑆𝑏 ÷ 𝑀𝑆𝑤
Within N-k 𝑆𝑆𝑤 𝑆𝑆𝑤 ÷ 𝑑𝑓
Total N-1 𝑆𝑆𝑇

Formula 𝑘
((σ 𝑋)𝑖 )2 ((σ 𝑋) 𝑇 )2
𝑺𝑺𝒃 = ෍ −
𝑛𝑖 𝑁
𝑖−1

𝑺𝑺𝒘 = ෍ 𝑆𝑆𝑖
𝑖=1

((σ 𝑋) )2
𝑇
𝑺𝑺𝑻 = (෍ 𝑋 2 ) −
𝑁
𝑇
Drug 1 Drug 2 Drug 3 Total

෍ 𝒙 = 𝟐𝟔𝟗 ෍ 𝒙 = 𝟖𝟎 ෍ 𝒙 = 𝟐𝟔𝟖 ෍ 𝒙 = 𝟔𝟏𝟕

N=6 N=4 N=5 N= 15


𝑥ҧ = 44.83 𝑥ҧ = 20 𝑥=53.6
ҧ 𝑥=41.13
ҧ
2 σ 𝑥 2 =1652 σ 𝑥 2 =15066
෍ 𝑥 = 𝟏𝟐𝟗𝟕𝟏 ෍ 𝑥2

= 29689

SS=910.83 SS=52 SS=701.2


𝑘
𝑘
((σ 𝑋)𝑖 )2 ((σ 𝑋) 𝑇 ) 2 ((σ 𝑋) 𝑇 )2
𝑆𝑆𝑏 = ෍ − 𝑆𝑆𝑤 = ෍ 𝑆𝑆𝑖 𝑆𝑆𝑇 = (෍ 𝑋 2 ) −
𝑛𝑖 𝑁 𝑖=1
𝑁
𝑖−1 𝑇

2692 802 2682 6172 = 910.83 + 52 + 701.2


=( + + )- 6172
6 4 5 15
= 29689 −
= 1664.03 15
= 2645.700003
= 4309.73333
ANOVA TABLE

Source df SS MS F
Between 2 2645.700003 1322.850002 9.53961168
Within 12 1664.03 138.6691667
Total 14 4309.7333
F critical: 5.10

Decision: Reject the null hypothesis.


ANOVA TABLE SPSS

Result in one-way ANOVA (p-value = 0.003) shows that


there is a highly statistically significant difference in the
mean time it takes for each of the three brands of medicine
to provide relief from a headache.
POST HOC TESTS
THANK YOU FOR LISTENING!

S-ar putea să vă placă și