0% found this document useful (0 votes)
28 views24 pages

DoE 2

Uploaded by

mereninnas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views24 pages

DoE 2

Uploaded by

mereninnas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Chapter-2

2. REVIEW ON SIMPLE COMPARATIVE EXPERIMENT


Review On Single Comparative Experiment
 Hypothesis testing is one of the branches of inferential statistics.
 It is a statistical method which is used to test the claim about the population parameter(s).

 The first step in hypothesis testing that stating the hypotheses in statistical terms.

• To accomplish this task,we have two types of hypotheses:


i. Null hypothesis

ii. Alternative hypothesis

• Null hypothesis: Denoted by H0 Is a claim (or a statement) of equality or no difference.


,

• Alternative hypothesis: Denoted by H 1, Is a complementary of null hypothesis.


• While we deal with hypothesis, we always encounter two types of errors:
i. Type I error

ii. Type II error


 Type I error occurs when the true null hypothesis is rejected.
 The value α represents the probability of committing this type of error, that is,
α = P(H0 is rejected=H0 is true)
 The value α represents the significance level of the test.
 Type II error occurs when a false null hypothesis is not rejected.
 The value β represents the probability of committing a Type II error, that is,β =P(H0
is not rejected=H0 is false)
 The value 1 −β is called the power of the test.
 It represents the probability of not making a Type II error.
 The two types of errors that occur in testing of hypothesis depend on each other.
 We can’t lower the value of α and β simultaneously for a test of hypothesis for a
fixed sample size.
 Cont….

Cont...
Lowering the value of α will raise the value of β and vise verse.
 However, we can decrease both of them simultaneously by increasing the sample size.

Actual Situation
Decision
𝐻𝑜 is true 𝐻𝑜 Is False

Do not reject 𝐻𝑜 Correct Decision Type II error

Reject 𝐻𝑜 Type I error Correct Decision

 A two tailed test has rejection regions in both tails


 A left tailed test has the rejection region in the left tail.
 A right tailed test has the rejection region in the right tail of the distribution curve.
Inference about the difference in means
• When we deal with the inference about the difference in means, two things will come into our
mind. Those are paired sample and independent sample.
• In case of paired sample: The sample is selected from a single population
Sample elements may be treated at two different circumstances at different
period of time such as pre and post, before and after
• Moreover, the sample size at two different situations and the subjects are the
same.
• In case of independent samples: The samples are selected from different or
the same population independently.
• The subjects are different and the sample sizes may or may not be the same.
Paired sample t -TestThe hypotheses of this test are:

ii. H0 : µ 1 − µ 2 = 0 or µ 1 = µ 2 or µ D = 0 Vs H 1 : µ 1 − µ 2 < 0 or µ 1 < µ 2 or µ D < 0


iii. H0 : µ 1 − µ 2 = 0 or µ 1 = µ 2 or µ D = 0 Vs H 1 : µ 1 − µ 2 > 0 or µ 1 > µ 2 or µ D > 0
• The null hypothesis says that there is no mean difference between the two
circumstances.
The data layout for paired sample looks like:
• Basic statistic
σ 𝒅𝒋 ഥ 𝟐
σ(𝒅𝒋 −𝒅) 𝑺𝒅 𝟐
ഥ= 𝟐 𝟐
• 𝒅 , 𝑺𝒅 = , 𝑺𝒅ഥ =
𝒏 𝒏−𝟏 𝒏

ത 𝑜
𝑑−𝜇 𝑑ത
• Test Statistic when the sample size less than 30 is 𝑡𝑐𝑎𝑙 = =
𝑆𝑑 2 𝑆𝑑 Τ√𝑛

• However, when the sample size is greater than or equal to 30, then we can approximate the t-distribution by Z-
distribution(using Central Limit Theorem).
ത 𝑜
𝑑−𝜇 𝑑ത
• Thus, the test statistic will be: 𝑍𝑐𝑎𝑙 = =
𝑆𝑑 2 𝑆𝑑 Τ√𝑛

• The rejection rule is presented as follows:


• Keep in mind that the null hypothesis is the same for the three varieties of alternative
hypotheses.
• A 100(1 - α)% confidence interval for difference in means will be obtained by:

• When the sample size is large enough, we can substitute t α/2 by Z α/2 . That is,

Example 1: As an aid for improving students study habits, nine students were randomly selected to attend a seminar
on the importance of education in life. The table below shows the number of hours each student studied per week
before and after the seminar.
student 1 2 3 4 5 6 7 8 9
before 9 12 6 15 3 18 10 13 7
After 9 17 9 20 2 21 15 22 6

At α = 0:1, did attending the seminar increase the number of hours the students
studied? And Construct a 90% confidence interval for µ d
Solution:
Student 1 2 3 4 5 6 7 8 9
Before 9 12 6 15 3 18 10 13 7
After 9 17 9 20 2 21 15 22 6
Difference(dj) 0 -5 -3 -5 1 -3 -5 -9 1

Then, 𝒅𝒋 =σ𝒏𝒊=𝟏 𝒃𝒆𝒇𝒐𝒓𝒆 − 𝑨𝒇𝒕𝒆𝒓 = 𝟎 − 𝟓 − 𝟑 − 𝟓 … … + 𝟏 = −𝟐𝟖


𝒅𝒋

𝒅= = -28/9 =-3.11
𝒏
ഥ 𝟐
σ(𝒅𝒋 −𝒅) (𝟎− −𝟑.𝟏𝟏 )𝟐 +(−𝟓− −𝟑.𝟏𝟏 )𝟐 + ⋯..+(𝟏− −𝟑.𝟏𝟏 )𝟐
𝟐
𝑺𝒅 = = = 88.8889/8=11.111
𝒏−𝟏 𝟖
𝟐 𝑺𝒅 𝟐
𝑺𝒅ഥ = =11.111/9=1.235
𝒏

Step1. state the Hypothesis test


H0 : µd = 0 Vs H1 : µd < 0
Step2. Since the sample is dependent sample, we use the t-distribution to infer about µd
ത 𝑜
𝑑−𝜇 𝑑ത −3.11
Step3. Test Statistic is 𝑡𝑐𝑎𝑙 = = = = -2.52
𝑆𝑑 2 𝑆𝑑 Τ 𝑛 1.235

Step4.Make Decision, Reject the null hypothesis if t < -tα(n - 1) Since -2.52 is less than -1.397,
we reject the null hypothesis at 5% level of significance
Step5. Conclusion: With 90% confidence, we conclude that attending the seminar increase
the number of hours the students studied.
The 90% confidence interval is 𝑑ҧ ± 𝑡 ∝/2 𝑆𝑑 Τ 𝑛 =(-3.11 – 1.73, -3.11 + 1.73)
 Independent Sample t-Test

Independent Sample t- Test


The hypotheses are the same as of paired sample t-test hypotheses. These are:
i. H0 : µ1 - µ2 = 0 or µ1 = µ2 or µD = 0 Vs H1 : µ1 - µ2 ≠ 0 or µ1 ≠ µ2 or µD ≠ 0
ii. H0 : µ1 - µ2 ≥ 0 or µ1 ≥ µ2 or µD ≥ 0 Vs H1 : µ1 - µ2 < 0 or µ1 < µ2 or µD < 0
iii. H0 : µ1 - µ2 ≤ 0 or µ1 ≤ µ2 or µD ≤ 0 Vs H1 : µ1 - µ2 > 0 or µ1 > µ2 or µD > 0
The data layout for independent sample t-test looks like:
Basic Statistic:
𝒏
𝟏 𝑿 𝒏
σ𝒋=𝟏 𝟐 𝑿
𝟏𝒋 𝟐 σ(𝑿𝟏 −ഥ𝒙𝟏 ) 𝟐 σ𝒊=𝟏 𝟐𝒊 𝟐 𝒙𝟐 )𝟐
σ(𝑿𝟐 −ഥ
• ഥ𝟏 =
𝑿 , 𝑺𝟏 = ഥ𝟐
,𝑿 = , 𝑺𝟐 =
𝒏𝟏 𝒏𝟏 −𝟏 𝒏𝟐 𝒏𝟐 −𝟏
𝟐 𝒏𝟏 −𝟏 𝑺𝟐𝟏 +(𝒏𝟐 −𝟏)𝑺𝟐𝟐
• 𝑺𝒑𝒐𝒐𝒍𝒆𝒅 =
𝒏𝟏 +𝒏𝟐 −𝟐
• Assumptions of independent sample t-test:
• The samples are selected randomly and independently.
• The population variances must be the same.
• In other words, there must be homogeneity of variance
Example. An experiment was conducted to evaluate the effectiveness for tapeworm in the
stomach of sheep. A random sample of 24 warm infected lambs of approximately the same
age and health was randomly divided into two groups. Twelve of the lambs were injected with
the drugs and the remaining twelve were left untreated. After a six month periods the lambs
were checked and the following worm counts were recorded.
Cont….
Drug treated sheep(x1)= 18,43,28,50,16,32,13,35,38,33,6,7
Untreated sheep(x2)=40,54,26,63,21,37,39,23,48,58,29,39

a. Test where the mean number of tapeworms in the stomach of the treated lambs is less than
the mean for untreated lambs at 5% level of significance.
b. Construct 95% CI for the difference in mean to assess the size of the d/c in the two means.
Solution:- The given data is summarized for the two groups as follows.
σ 𝒙𝟏𝒋 𝟏𝟖+𝟒𝟑+⋯𝟕 𝟑𝟏𝟗

𝑿𝟏 = = = = 𝟐𝟔. 𝟓𝟖 ഥ 𝟐 = σ 𝒙𝟐𝒊 =𝟒𝟎+𝟓𝟒+⋯+𝟑𝟗=𝟒𝟕𝟕 = 𝟑𝟗. 𝟕𝟓
𝑿
𝒏𝟏 𝟏𝟐 𝟏𝟐 𝒏𝟐 𝟏𝟐 𝟏𝟐

𝒙𝟏𝒋 )𝟐
σ(𝒙𝟏𝒋 −ഥ (𝟏𝟖−𝟐𝟔.𝟓𝟖)𝟐 + ⋯+(𝟕−𝟐𝟔.𝟓𝟖)𝟐 𝒙𝟐𝒋 )𝟐
σ(𝒙𝟐𝒋 −ഥ
𝑺𝟐𝟏 = = = 14.36,𝑺𝟐𝟐 = =
𝒏𝟏 −𝟏 𝟏𝟐−𝟏 𝒏𝟐 −𝟏

(𝟒𝟎−𝟑𝟗.𝟕𝟓)𝟐 + ⋯+(𝟑𝟗−𝟑𝟗.𝟕𝟓)𝟐
=13.86 Check it
𝟏𝟏∗𝟏𝟒.𝟑𝟔+𝟏𝟏∗𝟏𝟑.𝟖𝟔
𝑺𝟐𝒑𝒐𝒐𝒍𝒆𝒅 = =310.42/22=14.11 𝑆𝑝𝑜𝑜𝑙𝑒𝑑 = 14.11 = 3.76
𝟐𝟒−𝟐

𝑥1−𝑥2 26.58−39.75
𝑡𝑐𝑎𝑙 = = =-2.272
1 1 1 1
𝑠𝑝 𝑛1+𝑛2 3.76 +
12 12

Then,Step1 State the hypothesis


H0: There is no difference between the means
H1: There is difference the between the means
Step2 Identify level of significance(α=0.05)
Step 3 calculate the test statistic tcal=-2.272 and t α(n1+n2-2)=t0.05(22)=1.717
Step4 Draw decision,Reject Ho,if tcal<-t0.05(22)
Since,-2.272<-1.717,H0 is rejected
Step 5 Conclusion
We have enough evidence to conclude that there is the mean difference between treated and untreated lambs
at 95% confidence level.
• Checking the assumption of equality of variances is conducted as follows:

• The null hypothesis says that there is homogeneity of variance.


• The test statistic is:

• Reject the assumption of homogeneity of variance when F > Fα/2(v1; v2)


Where v1 is the degree of freedom of the numerator and v2 is the degree of freedom of the denominator.
Note that:
The best test statistic for testing the difference in means of is:
Case 1: The assumption of the homogeneity of variances is satisfied.

Case 2: The assumption of the homogeneity of variances is not satisfied

Rejection rule:
A 100(1 α)% confidence interval for the difference in means is:
Case 1:𝝈𝟐𝟏 = 𝝈𝟐𝟐

Case 1:𝝈𝟐𝟏 ≠ 𝝈𝟐𝟐

Example 2: A researcher claims that the mean salary of elementary school teachers is greater than the mean
salary of secondary school teachers in a large school district. The mean salaries of a sample of 26 elementary
school teachers is $48,956 and the sample standard deviation is $3,912.40. The mean salaries of a sample of 24
secondary school teachers is $45,633 and the standard deviation is $5,533. Assume that the two populations are
normally distributed with equal standard deviation.
a) At α = 0:05, can it be concluded that the mean salaries of the elementary school teachers is greater than the

mean salaries of the secondary school teachers? b) Construct a 95% confidence interval for µ1 - µ2
Solution:- The same procedure with example two.
• Example 4: The mean age of a sample of 25 people who were playing the slot machines is 48.7 years, and the
standard deviation is 6.8 years. The mean age of a sample of 35 people who were playing roulette is 55.3 with
a standard deviation of 3.2 years.
Assume that the two populations are normally distributed with unequal standard deviation.
a) Can it be concluded at α = 0:05 that the mean age of those playing the slot machines is less than those
playing roulette?
b) Construct a 95% confidence interval for the difference between the mean age of all those playing the slot

machines and those playing roulette.

• Solution(Class work)
Inference about the Variance of Normal Distribution

Inferences about the Variance of Normal distributions


𝑛−1 𝑆 2
• If the population from which the sample is selected is (approximately) normally distributed, then has a
𝜎2

chi-square distribution with (n-1) degree of freedom.


• The hypotheses about a single population variance:

• Since variance cannot be negative, we use the chi-square distribution to infer about a population variance.

The test statistic is:

Rejection rule:
A 100(1 - α)% confidence interval for population variance is:

Example 5: A random sample of 25 customers taken from a certain bank gave the variance of the waiting times
for service is equal to 12.96 square minutes. Assume that the population is normal.
a) Can it be concluded at α = 0:05 that the variance of the waiting times for service of all customers is different
from 7.29 square minutes?

b) Construct a 95% confidence interval for the population variance.

Solution:
a) Given n = 25, σ2 = 12:96, α = 0:05
i. H0 : σ2 = 7:29 Vs H1 : σ2 ≠ 7:29
ii. Since variance cannot be negative, we use the χ2 distribution

2 25−1 12.96 24∗12.96


iii. Test statistic × = = = 42.67
7.29 7.29
iv. Decision rule:
Reject the null hypothesis if χ2 > χ2α/2(n - 1) Since 42:67 > 40:65, we reject H0 at 5% level of
significance.
V. Conclusion: With 95% confidence, we can conclude that the variance of the waiting times for
service of all customers is different from 7.29 square minutes.

b) The (1 - α)100% confidence interval for σ2 is:

24∗12.96 24∗12.96
The 95% confidence interval for σ2 is: , = (7.65, 23.71)
40.65 13.12

• Therefore, the confidence interval support the hypothesis test that the population
variance is different from 7.29.
Hypothesis testing about the ratio of two population variance:

• Use the F-distribution to infer about the ratio of two population variance.

Rejection rule:
A 100(1 - α)% confidence interval for the ratio of two population variance can be:

𝑆12 𝑣1 ,𝑣2 𝑆12 (𝑣1 ,𝑣2 )


• ( 2 𝐹 α , 2 𝐹∝/2 )
𝑆2 1− 𝑆2
2

Example 4: Suppose two independent random samples of size 21 and 13 selected from two normally
distributed population. If the first sample produced a standard deviation of 48.1 and the second sample gave a
standard deviation of 89.2 then:
a) Test at 5% significance level if the variances of the two population are equal
b) Construct the 95% confidence interval for the ratio of the two population variances.
Solution:- step 1 State the Hypothesis test

step 2 Use the F-distribution

𝑆12 (48.1)2
Step 3 The test statistic F = = = 0.29
𝑆22 (89.2)2
Step4.Decision rule: Reject H0 if F < F1- α /2 (n1 - 1; n2 - 1) or F > Fα/2 (n1 - 1; n2 - 1)

Since 0:29 < 0:373, we reject H0 at 5% level of significance.


Step 5 Conclusion: With 95% confidence, we can conclude that the two population Variances are not equal.
b) The (1 - α)100% confidence interval for the ratio of the two population variances are:

The confidence interval doesn’t contain one, this reveals that the two population variances
are not equal.

You might also like