0% found this document useful (0 votes)
12 views21 pages

Hypothesis Testing Explained: Types & Errors

The document discusses the theory and procedures of hypothesis testing, focusing on the null and alternative hypotheses, types of errors, significance levels, and test statistics. It outlines the steps for formulating and testing hypotheses, including examples related to single population means. The document emphasizes the importance of understanding Type I and Type II errors, confidence levels, and the critical regions for decision-making in statistical analysis.

Uploaded by

ansabkhan299
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)
12 views21 pages

Hypothesis Testing Explained: Types & Errors

The document discusses the theory and procedures of hypothesis testing, focusing on the null and alternative hypotheses, types of errors, significance levels, and test statistics. It outlines the steps for formulating and testing hypotheses, including examples related to single population means. The document emphasizes the importance of understanding Type I and Type II errors, confidence levels, and the critical regions for decision-making in statistical analysis.

Uploaded by

ansabkhan299
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

1 of 21

Test of Hypothesis
The theory of hypothesis testing is concerned with developing rules or procedures for
deciding whether to reject or not reject the null hypothesis. There are two mutually
complementary approaches for devising such rules, namely, confidence Interval and test of
significance. Both these approaches predicate that the variable (statistic of estimator) under
consideration has some probability distribution and that hypothesis testing involves making
statements or assertions about the value(s) of the parameter(s) of such distribution. A hypothesis
is assumption which we make about a population parameter. The hypothesis which we wish to
test (on the basis of the evidence of our sample estimate) is called the null hypothesis, because it
implies that there is no difference between the true parameter and the hypothesized value, or the
difference between the true value and the hypothesized value is null. Symbolically, H: μ = μo.
The alternative hypothesis (A) is an alternative assumption about the population parameter, a
counter proposition to the null hypothesis.

Testing and confidence intervals are closely related in a mathematical sense but the two
techniques have different purposes. The confidence interval provides an assessment of how
accurately we know the parameter (say, μ), while the test indicates whether the parameter (μ)
could have the hypothesized value (μo).
TESTING OF HYPOTHESIS
Testing of hypothesis is a procedure which enables us to decide on the basis of

information obtained from the sample taken from the population whether to reject or don’t reject
any specified statement or hypothesis regarding the value of the population parameter in a
statistical problem.
STATISTICAL HYPOTHESIS
An assumption made about the population parameter which may or may not be true is
called a statistical hypothesis.
NULL HYPOTHESIS
The null hypothesis generally denoted by symbol HO, is any hypothesis which is to be
tested for possible rejection or nullification under the assumption that it is true. A null hypothesis
should always be precise such as the given coin is unbiased or a drug is ineffective in curing a
particular disease or there is no difference between the two teaching methods. The null
hypothesis always contains some form of an equality sign.
ALTERNATIVE HYPOTHESIS
The complement of the null hypothesis is called the alternative hypothesis. It is denoted
by HA. The alternative hypothesis never contains the sign of equality and is always in an
inequality form.
SIMPLE AND COMPOSITE HYPOTHESIS
A statistical hypothesis is said to be a simple hypothesis if it completely specifies the
value (s) of the parameter (s). For example, if we hypothesize that µ = 62 or π = 0.4 etc. we have
stated a simple hypothesis. If a hypothesis is not simple i.e. doesn’t completely specify the values
of the parameters it is called a composite hypothesis. For example, if we hypothesize that μ 10,
the hypothesis is composite as it doesn’t assign a specified value to the parameter μ. Obviously,
the parameter μ has more than one value. The concept of simple and composite hypothesis
applies to both null hypothesis and alternative hypothesis.
FORMULATION OF HYPOTHESES
2 of 21

The hypotheses must be formulated in such a way that when one is true, the other is
false. The basic rule in formulating hypotheses is to make A the hypothesis that the experiment
thinks is true or the hypothesis that he (she) wants to establish as true. Sometimes hypotheses are
formulated from an experimenter’s attitude toward a claim. If the experimenter wishes to
establish a certain claim with substantive support of sample information, then the claim is taken
as the alternative hypothesis H1 and its negation becomes the null hypotheses HO. If the
experimenter wants to disprove or refute the claim then claim is made H. If the problem simply
says to test a claim, it would be interpreted to mean that the claim is to be disproved (and would
be made H). In situations where we want to test for a change in the value of a parameter, the old
or accepted value of parameter is used for H and A includes the new value.
TYPE I AND TYPE II ERRORS
Don’t rejecting a true Ho is correct decision and is not an error. Rejecting a false Ho is
correct decision and is not an error. Rejecting a true Ho is wrong decision and is called type I
error. Don’t rejecting a false Ho is wrong decision and is called type II error.

Actual situation
Decision on the basis
Ho is true Ho is false
of sample information
Reject Ho Type I error Correct decision
Don’ t Reject Ho Correct decision Type II error

Probability of committing type I error is denoted by α and that of committing a type II


error is denoted by β. Thus α is the probability of rejecting Ho when Ho is true and β is the
probability of don’t rejecting Ho when Ho is false. Symbolically,
α = P( Type I error ) = P( Reject Ho | Ho is true)
β = P( Type II error ) = P( Don’t Reject Ho | Ho is false).

Decision on the basis Actual situation


of sample information Ho is true Ho is false

Reject Ho Α β
Don’ t Reject Ho 1-α 1-β

When Ho is rejected, then type I error can be committed and when Ho is not rejected,
then type II error can be committed. α and β are inversely related to each other. We can decrease
both of them by increasing the sample size.
SIGNIFICANCE LEVEL
Probability of committing a type I error is called the level of significance denoted by α.
The level of significance is also called the size of test. By α =5% we mean that there are about 5
chances in 100 of incorrectly rejecting a true null hypothesis. To put it in another way we say
that we are 95% confident in making the correct decision.
*OBSERVED (EXACT) LEVEL OF SIGNIFICANCE/ PROBABILITY VALUE
The P value is defined as the lowest significance level at which a null hypothesis can be
rejected. If P < α, reject H at α level (i.e., significant H). P-values are often used in hypothesis
tests, where you either reject or fail to reject a null hypothesis. The p-value represents the
probability of making a Type 1 error, which is rejecting the null hypothesis when it is true. The
smaller the p-value, the smaller is the probability that you would be making a mistake by
rejecting the null hypothesis. A cut-off value often used is 0.05, that is, reject the null hypothesis
when the p-value is less than 0.05. For example, suppose you do a t-test to test the null
hypothesis that m equals 5, versus the alternative hypothesis that it does not equal 5. You would
reject the null hypothesis that m equals 5 if the test yields a very small (for example, less than
0.05) p-value.
LEVEL OF CONFIDENCE
The probability of not committing a type I error, (1- α), is called the level of confidence,
confidence interval or confidence co-efficient.
3 of 21

POWER OF A TEST
The probability of not committing a type II error, (1-β), is called the power of the test.
TEST STATISTIC
A statistic, which provides a basis for testing a null hypothesis, is called a test statistic.
OR A statistic on which the decision of rejecting or don’t rejecting the null hypothesis is based is
called a test statistic. OR A test statistic is the ratio of sampling error to the standard error. In
testing of hypothesis the sampling distribution of the test statistic is based on the assumption that
the null hypothesis is true.
NON-REJECTION REGION
Non-rejection region is that part of the sampling distribution of a statistic for which the
HO is not rejected.
CRITICAL REGION/REJECTION REGION
Critical region is that part of the sampling distribution of a statistic for which the HO is
rejected. HO is rejected when probability of its occurrence is less than or equal to level of
significance. A null hypothesis is rejected if the value of test- statistic is not consistent with the
HO. CR is associated with H1.
TEST OF SIGNIFICANCE
A test of significance is a procedure by which sample results are used to verify the truth
or falsity of a null hypothesis. In the language of significance tests, a statistic is said to be
statistically significant if the value of the test statistic lies in the CR. In this case the null
hypothesis is rejected. By the same token, a test is said to be statistically non-significant if the
value of the test statistic lies in the non-rejection region. In this case the null hypothesis is not
rejected.
ONE TAILED AND TWO TAILED TESTS
If the CR is located in only one tail (either left or right) of the sampling distribution of
the test statistic then it is called one tailed or one sided test. If the CR is located in the both tails
of the sampling distribution of the test statistic, then it is called a two tailed or two sided test.
Test for Ho: θ ≤ θH Vs H1: θ  θH is a one tailed (right tailed) test and the CR is located
at the right tail.
CR


Test for Ho: θ≥ θH Vs H1: θθH is a one tailed (left tailed) test and the CR is located at
the left tail.

CR

Test for Ho: θ= θH Vs H1:Zθ≠θ


α H is a two tailed test and the CR is located in

the both tails. In two tailed test, the level of significance is divided by 2 i.e.
α/2.

CR CR

-Zα/2 Zα/2

One tailed and two tailed test are associated with only alternative hypothesis.
GENERAL PROCEDURE FOR TESTING HYPOTHESIS
i Formulate the null and alternative hypotheses.
ii. Decide upon a significance level, α.
iii. Choose an appropriate test statistic.
4 of 21

iv. Determine the CR. The location of the CR depends upon the form of HA. Choose
the location of the critical region on the basis of the direction at which the
inequalities sign points.
a) If >, choose the right tail as the CR.
b) If <, choose the left tail as the CR.
c) If ≠, choose a two-tailed CR.
v. Compute the value of the test statistic from the sample data.
vi. Reject H if the computed value of test statistic falls in the CR, otherwise don’t
reject H.

Steps for Testing of hypothesis about single population mean


1):-Construction of hypotheses
2):- Level of significance
3):- Test statistic
4):-Decision rule

5):-Conclusion

Test of hypothesis included in the course


1. About Single population mean μ
2. About difference between population means μ1 – μ2
3. About several means
5 of 21

TEST OF HYPOTHESIS FOR SINGLE POPULATION MEAN


Example(1):- It is claimed that an automobile is driven on the average more than 12,000 miles per
year. To test this claim a random sample of 100 automobiles owners are asked to keep a record
of the miles they travel. Would you agree with the claim if the random sample showed an
average of 12500 miles and a standard deviation of 2400 miles?
Solution:-
1) Construction of hypotheses
Ho :   12000
H1:  > 12000
2) Level of significance
 = 5%
3) Test Statistic

X − o 12500 − 12000
Z= = = 2.083
s 2
(2400) 2
n 100

4) Decision Rule:- Reject Ho if Zcal  Z


5) Result:-As Zcal > Z.05 =1.645, So reject Ho and conclude that the claim is true.

Example(2):-It is known from past records that the average weight of calf 4 weeks after birth is
20 Kg, with standard deviation of 9 Kg. A new feed is given to a large group of lambs and a
random sample of 36 lambs is selected. The average weight is found to be 23.3 Kg. whether the
feed is effective in increasing the weight of the lambs. Test the effective of new feed at 5%.
Solution:-
1) Construction of hypotheses
Ho :   20
H1:  > 20
2) Level of significance
 = 5%
3) Test Statistic

X − 23.3 − 20
Z= = = 2.2
2 81
n 36
4) Decision Rule:- Reject Ho if Zcal  Z
5) Result:-As Zcal =2.2 > Z.05 =1.645, So reject Ho and conclude that data support the claim that
the new feed will improve the average weight.

Example(3):-A random sample of 30 wheat forms from Faisalabad district showed the mean
wheat production of 50 Kg per acre. Can we conclude that the mean production of wheat from
Faisalabad district is greater than 45 Kg per acre, if population variance is known to be 9 Kg2.
Use 5% level of significance?
Solution:-
1) Construction of hypotheses
Ho :   45
H1:  > 45
2) Level of significance
 = 5%
3) Test Statistic
Zcal

X − 50 − 45
Z= = = 9.13
 2
9
n 30 Z.05=1.96
6 of 21

4) Decision Rule:- Reject Ho if Zcal  Z


5) Result:-As Zcal > Z So reject Ho and conclude that the average wheat production in
Faisalabad district is more than 45 Kg per acre.

Example(4):-It has been found from experience that the mean breaking strength of a particular
brand of thread is 9.63N with a standard deviation of 1.40N. Recently a sample of 36 pieces of
thread showed a mean breaking strength of 8.93N. Can we conclude that the thread has become
inferior?
Solution:-
1) Construction of hypotheses
Ho :   9.63
H1:  < 9.63
2) Level of significance
 = 5%
3) Test Statistic

X − o 8.93 − 9.63
Z= == = −3
2 (1.40) 2
n 36

4) Decision Rule:- Reject Ho if Zcal  - Z


5) Result:-As Zcal < - Z= -1.645 therefore we conclude that threat has become inferior.

Example(5):- A hospital uses large quantity of packaged doses of a particular drug. The
individual dose of this drug is 100 cc. The action of the drug is such that the body will
harmlessly pass off excessive doses. On the other hand, insufficient doses do not produce the
desired medical effect, and they interfere with patient treatment. The hospital has purchased this
drug from the same manufacturer for a number of years and knows that the population standard
deviation is 2 cc. The hospital inspects 50 doses of this drug at random from a very large
shipment and finds the mean of these doses to be 99.75 cc. If the hospital sets 5% significance
level and ask us whether the dosages in this shipment are too small, how can we find the answer.
Solution:-  < 100 (whether the dosages in this shipment are too small)
1) Construction of hypotheses
Ho :   100
H1:  < 100
2) Level of significance
 = 5%
3) Test Statistic

X − o 99.75 − 100
Z= = = −0.88
2 4
n 50
4) Decision Rule:- Reject Ho if Zcal  - Z

5) Result:-As Zcal > - Z= -1.645 therefore the hospital should accept the null hypothesis because
the observed mean of the sample is not significantly lower than the hypothesized mean of 100cc.
On the basis of this sample of 50 doses, the hospital should conclude that the doses in the
shipment are sufficient.

Example(6):-A random sample of 40 sun flowers plants from a large population of plants
showed 55 days as mean number of days of flowering with variance 2 days2. On the basis of
above sample information can we conclude that average number of days of flowerings of
sunflower population is at least 56 days.
Solution:-
1) Construction of hypotheses
Ho :   56
H1:  < 56
2) Level of significance
7 of 21

 = 5%
3) Test Statistic
Zcal

X − 55 − 56
Z= = = -4.47
S2 2
n 40 -Z.05= -1.96

4) Decision Rule:- Reject Ho if Zcal  - Z


5) Result:-As Zcal < - Z So reject Ho and conclude that the average number of days of
flowering of the sun flowers is less than 56 days.

Example(7):-The average amount of pesticide that is packed in canes is 6 liters. A random


sample of 10 canes showed mean amount of pesticide 6.1 liter with standard deviation of 0.25
liters. Is process out of control?
Solution:-
1) Construction of hypotheses
Ho :  = 6
H1:   6
2) Level of significance
 = 5%
3) Test Statistic
tcal

X − 6 .1 − 6
t= = = 1.26
S2 0.0625
n 10 t.025(9) = 2.262 -t.025(9)= -2.262

4) Decision Rule:- Reject Ho if tcal  t/2(n-1) or tcal  - t/2(n-1)


5) Result:-As tcal < t/2 (n-1) so don’t reject Ho and conclude that the process is in control

Example(8):-The mean lifetime of bulbs produced by a company has in past been 1120 hours. A
sample of 9 electric light bulbs recently chosen from a supply of newly produced battery showed
a mean lifetime of 1170 hours with a standard deviation of 120 hours. Test that mean lifetime of
the bulbs has not changed. ( = 1120)
Solution:-
1) Construction of hypotheses
Ho:  = 1120
H1:   1120
2) Level of significance
 = 5%
3) Test Statistic

X − o 1170 − 1120
t= = = 1.25
S2 (120)
2

n 9

4) Decision Rule:- Reject Ho if | tcal |  t/2(n-1) OR


tcal  t/2(n-1) or tcal  - t/2(n-1)

5) Result:-As | tcal | =1.25 < t.025 (8),=2.306 So don’t reject Ho and conclude that the mean life has
not changed.
8 of 21

Confidence Interval for population mean


Example(1 A random sample of 20 values is drawn from a normal population whose mean is
50. Construct (i)90% (ii) 95% (iii) 99% C.I for population mean whose standard deviation is 5.
Also find the width of the confidence interval.
 2 

  
Solution:- 90% C.I for  X  Z /2
 n 
 
 2 
 
= 50 Z .05  5  = 50 1.645(1.118) (48.16, 51.84)
 20 
 
Width of confidence Interval= 3.68

 2   2 
  

 5  50 1.96(1.118)
95% C.I for  X  Z /2 = 50 Z .025  =
 n   20 
   
(47.81, 52.19)
Width of confidence Interval= 4.38

 2   2 
  

 5  50 2.58(1.118)
99% C.I for  X  Z /2 = 50 Z .005  =
 n   20 
   
(47.12, 52.88)
Width of confidence Interval= 5.77

NOTE:- The larger the confidence coefficient the larger is the width i.e larger width mean
estimator is less precise

Example(2):- A researcher wishes to estimate the average amount of money that a student
from university spends for food per day. A random sample of 36 students is selected and the
sample mean is found to be Rs 45 with standard deviation of Rs.3. Estimate 90 % confidence
limits for the average amount of money that the students from the university spend on food per
day.
Solution:-
 2 

 S 
90% C.I for  X  Z /2
 n 
1.645  
 2 
 3 
45 Z .0.05 
 36 
 
451.645)(0.5) = ( 44.18 , 45.82)

Example(3):- The following data represents the daily milk production of a random sample of
10 cows from a particular breed 12,15,11,13,16,19,15,16,18,15. Construct 90% C.I for the
average milk production of all the cows of that particular breed.
− 2

X =
X =
150
= 15
2
=
(X − X ) =
56
= 22.89
n 10 S n −1 9

 2 

 S 
90% C.I for  X  t / 2( n −1) 
 n 
1.833  
 22.89 
15 t .05(9)  

 10 
15  1.833(1.51) =(12.23 , 17.77)
9 of 21

Test of hypothesis for difference between Population means


Example(1):- A new chemical fertilizer, nitro plus, yielded 20,400 pounds of tomatoes on the
average on 40 randomly selected acres of farmland. On another 100 randomly selected acres the
standard organic fertilizer produced a mean yield of 19,000 pounds with a standard deviation
1000 pounds. Do the results of the comparison indicate that the chemical fertilizer really
produces larger yields than the organic? Assume that the population standard deviations are
known to be 1200 and 1000 respectively.

Solution:-
1) Construction of hypotheses
Ho : 1  2
H1: 1 > 2
2) Level of significance
 = 5%
3) Test Statistic Zcal
− −
( X 1− X 2) − ( 1 −  2) (20400 − 19000) − (0)
= = 6.53
Z= 1 2
2 2
12002 10002
+ +
n1 n2 40 100

Z.05=1.645
4) Decision Rule:- Reject Ho if Zcal  Z
5) Result:-As Zcal > Z .So reject H0 and conclude that the chemical fertilizer produces
more yield than the organic fertilizer.

Example(2):- A random sample of 6400 wheat plants of LU26 has a mean height of 67.85
inches with standard deviation of 2.56 inches, while a random sample of 1600 plants from Pak-
81 has a mean height of 68.55 inches with a standard deviation of 2.52 inches. Do the data
indicate that plants from Pak81 are on the average taller than LU26?
Solution:-
1) Construction of hypotheses
Ho : 1  2
H1: 1 < 2
2) Level of significance
 = 5% Zcal
3) Test Statistic
− −
( X 1− X 2) − ( 1 −  2) (67.85 − 68.55) − (0)
Z= = = -9.92
2 2
S1 S2 2.56 2 2.52 2
+ +
n1 n2 6400 1600
-Z.05= -1.645
4) Decision Rule:- Reject Ho if Zcal  -Z
5) Result:-As Zcal < - Z , so reject H0 and conclude that plants from Pak-81 are on the
average taller than Plants from LU26.

Example(3):- The strength of ropes made out of cotton yarn and coir gave on measurement the
following values
Cotton yarn:7.5 5.4 10.6 9.0 6.1 10.2 7.9 9.7 7.1 8.5
Coir :8.3 6.1 9.6 10.4 6.4 10.0 7.9 8.9 7.5 9.7
Test whether there is a significant difference in the strength of the two types of ropes at 5% level
of significance. Assume population variances are equal

Cotton(X1) Coir(X2) (X1-X1) (X2 -X2) (X1-X1)2 (X2-X2)2


7.5 8.3 -0.7 -0.18 0.49 0.0324
5.4 6.1 -2.8 -2.38 7.84 5.6644
10.6 9.6 2.4 1.12 5.76 1.2544
10 of 21

9 10.4 0.8 1.92 0.64 3.6864


6.1 6.4 -2.1 -2.08 4.41 4.3264
10.2 10 2 1.52 4 2.3104
7.9 7.9 -0.3 -0.58 0.09 0.3364
9.7 8.9 1.5 0.42 2.25 0.1764
7.1 7.5 -1.1 -0.98 1.21 0.9604
8.5 9.7 0.3 1.22 0.09 1.4884
82 84.8 26.78 20.236

X1 =
 X 1 = 82 = 8.2 −
X2 =
 X 2 = 84.8 = 8.48
n1 10 n2 10
− −

=
2  ( X 1 − X 1) 2
=
26.78
=
2
=
 ( X 2 − X 2) 2 = 20.236 = 3.14
S1 n1 − 1 9
2.98 S2 n2 − 1 9
(n1 − 1) S1 + (n2 − 1) S 2
2 2
26.78 + 20.236
Sp 2 = = = 2.612
(n1 − 1) + (n2 − 1) 9+9
11 of 21

Solution:-
1) Construction of hypotheses
Ho : 1 = 2
H1: 1  2
2) Level of significance
 = 5%
3) Test Statistic
First test the equality of two variances
1) Construction of hypotheses
Ho : 12 = 22
H1: 12  22
2) Level of significance
 = 5%
3) Test Statistic
S 22 F.05(9,9)=3.19
F= 2 S 2  S1
2 2

S1
4) Decision Rule:- Reject Ho if Fcal  F(n2-1 , n1-1)
5) Result:-As Fcal < F(n2-1, n1-1 ) So do not reject Ho and conclude that population variances
are equal.

tcal
− −
( X 1− X 2) − ( 1 −  2) (8.2 − 8.48) − (0)
t= = = −0.38
1 1  1 1
S p  n1 + n2  2.612 + 
2

9 9
-t.025(18)= -2.101 t.025(18) = 2.101

4) Decision Rule:- Reject Ho if tcal  - t/2(n1+n2-2 ) or t cal  t/2(n1+n2-2)


5) Result:-As tcal < - t/2(n1+n2-2 ) so reject Ho and conclude that there is significant
difference between the ropes made from cotton and coir yarn.

Example(4):-Six horses were feed on diet A, 5 on diet B. the gains in weights for the
individual horses were as shown
Diet A(X1) 30 30 28 38 28 26 180
Diet B(X2) 40 34 38 32 26 170
88
2
(X1– 30) 0 0 4 64 4 16
(X2 – 34) 120
2
36 0 16 4 64
Can we conclude that diet B is better as compare to diet A for increasing weight.
Assume population variances are unequal.

X1 =
 X 1 = 180 = 30 −
X2 =
 X 2 = 170 = 34
n1 6 n2 5
− −
2
=
 ( X 1 − X 1) 2

=
88
= 17.6
2
=
 ( X 2 − X 2) 2

=
120
= 30
S 1
n1 − 1 5 S 2
n2 − 1 4

df =
w1 + w22 7 Where w1= S12/n1 =2.93 and w1= S22/n2 =6
( w1) 2 ( w2) 2
+
n1 − 1 n 2 − 1
`

Solution:-
1) Construction of hypotheses
Ho : 1  2
H1: 1 < 2
12 of 21

2) Level of significance
 = 5%
3) Test Statistic tcal

(30 − 34) − (0)


t= = −1.34
17.6 30
+
6 5 -t.05(7)= -1.895

4) Decision Rule:- Reject Ho if tcal  - t(df)


5) Result:-As tcal > t(df) So don’t reject Ho and conclude that diet B is not better than A .
13 of 21

Example(5):-An experiment was performed with seven hop plants. One half of each plant was
pollinated and the other half was not pollinated. The yield of seed of each hop plant is given
below
Plant No:- 1 2 3 4 5 6 7
Pollinated:- 0.78 0.76 0.43 0.92 0.86 0.59 0.68
Non-Pollinated 0.21 0.12 0.32 0.29 0.30 .20 0.14
Test whether the pollinated half of the plant gives a higher yield of seed than the non-pollinated
half.
Pollinated(X1) Non-Pollinated(X2) d=X1 -X2 (d – 0.491)2
0.78 0.21 0.57 0.006241
0.76 0.12 0.64 0.022201
0.43 0.32 0.11 0.145161
0.92 0.29 0.63 0.019321
0.86 0.3 0.56 0.004761
0.59 0.2 0.39 0.010201
0.68 0.14 0.54 0.002401
3.44 0.2103
3.44 0.2103
d = = 0.491 S d2 = = 0.0349
7 6

Solution:-
d
1) Construction of hypotheses
Ho : 1  2 i.e. 1 - 2  0
H1: : 1 > 2 i.e. 1 - 2 >0
2) Level of significance
 = 5%
tcal
3) Test Statistic

d − d 0.491 − 0
t= = = 6.96
S 2d 0.0349
n 7 t.05(6) = 1.943

4) Decision Rule:- Reject Ho if tcal  t(n-1)


5) Result:-As tcal > t(n-1) So reject Ho and may conclude there is evidence that
pollinated gives a higher mean yield of seed.
14 of 21

Confidence interval for difference between Population means


Example(1):-The coagulation times in seconds for blood drawn from 200 animals randomly
allocated to two different diets were recorded. The number of animals in each treatment is 100.
Their means are 66 and 61 seconds and population variances are known to be 3.3 & 3.0
respectively. Construct 95 % Confidence interval for difference between mean blood coagulation
times for two diets.
 2 
 
2
− −
 
95% C.I for 1- 2 Formula for C.I ( X 1− X 2) Z  / 2  1
+ 2
 n1 n2 
 
Z.025=1.96
 3.3 3.0 
(66 − 61)  Z  / 2  + 

 100 100 

51.96(0.251)=(4.51,5.49)

Example(2):-A test in Statistics was given to 50 girls and 75 boys. The girls made an average
grade of 76 with a standard deviation of 6, while boys made grade of 82 with a standard
deviation of 8. Find 96% confidence interval for the difference between 1-2. Where 1 is the
mean of all boys and 2 is the mean of all girls who might take this test
Z(.02)=2.054
96% C.I for 1- 2
 2 2  2 2 
 S   8 6 
+S
− −
( X 1− X 2) Z  / 2  1

2
= (82 − 76)  Z  / 2  + 
 n1 n2   75 50 
   
6  (2.054)(1.254) =(3.42 , 8.58)
Example(3):- Following are the protein contents measured in two types of species
Species 1 (X1) 0.72 1.12 0.81 0.89 0.72 0.81 1.01 0.75 0.83 7.659
Species 2(X2) 1.21 0.93 0.80 1.12 1.22 0.94 0.87 7.070
(X1 – 0.851)2 0.0172 0.0724 0.0017 0.0015 0.0172 0.0017 0.0253 0.0102 0.0004 0.1472
(X2 – 1.013)2 0.0400 0.0064 0.0441 0.0121 0.0441 0.0049 0.0196 0.1712
Construct 95% Confidence interval for difference between means(Assume population variances
are equal)
− −
X 1 =  X 1 / n = 7.659 / 9 = 0.851 X 2 =  X 2 / n = 7.07 / 7 = 1.01 3
− −
 ( X 1 − X 1) 2 0.1472  ( X 2 − X 2) 0.1712 2

S 1 = n1 − 1 = 8 = 0.0184 S 2 = n2 − 1 = 6 = 0.0285
2 2

(n1 − 1) S12 + (n2 − 1) S 2 2 0.1472 + 0.1712


Sp 2 = = = 0.0227
(n1 − 1) + (n2 − 1) 8+6

− −  2 1 1 
95% C.I for 1- 2 Formula for C.I ( X 1− X 2) t / 2( n1+ n 2−2)  S p  +  
  n1 n2  

2.145 
1 1
(0.851 − 1.013) t 0.025(14)  0.0227 +  
  9 7  

-0.1620.1629 =(-0.325 , 0.0001)

Example(4):-A random sample of 20 plants from Variety I showed a mean height of 63 cm with
standard deviation of 6 cm, while an other random sample of 25 plants from Varity II showed a
mean height of 60 cm with standard deviation of 2 cm. Construct 90 confidence interval for the
difference between two variety means.(Assume population variances are unequal)

df =
w1 + w2
2
 23 Where w1= S12/n1=36/20=1.8 and w1= S22/n2=4/25=0.16
2 2
( w1) ( w2)
+
n1 − 1 n 2 − 1
15 of 21

 2 2 
− −
 S S 
90% C.I for 1- 2 Formula for C.I ( X 1− X 2) t / 2( df )  1
+ 2
 n1 n2 
 
t.05(23)=1.71
4
 2 2 
− −
 S1 S 2 
( X 1− X 2) t / 2( df )  +
 n1 n2 
 
3(1.71)(1.4)= (0.606 , 5.394)
Example(5):-:- An experiment was performed with seven hop plants. One half of each plant was
pollinated and the other half was not pollinated. The yield of seed of each hop plant is given
below
Plant No:- 1 2 3 4 5 6 7
Pollinated:- 0.78 0.76 0.43 0.92 0.86 0.59 0.68
Non-Pollinated 0.21 0.12 0.32 0.29 0.30 .20 0.14
Construct 90 % confidence interval for difference between mean seed for pollinated and non-
pollinated half.
Pollinated(X1) Non-Pollinated(X2) d=X1 -X2 (d – 0.491)2
0.78 0.21 0.57 0.006241
0.76 0.12 0.64 0.022201
0.43 0.32 0.11 0.145161
0.92 0.29 0.63 0.019321
0.86 0.3 0.56 0.004761
0.59 0.2 0.39 0.010201
0.68 0.14 0.54 0.002401
5.02 1.58 3.44 0.2103

X1=0.717 X2=0.226 d=3.44/7=0.491 S2d=0.2103/6=0.0349

 2 

 Sd 
90% C.I for 1- 2 Formula for C.I (d ) t / 2( n −1)  
 n 
 
t.05(6)=1.943
 0.0349 
(0.491)  t / 2( n −1)  
 7 
(0.491)(1.943)(0.0706)=(0.354, 0.628)

COMPARING MORE THAN TWO POPULATION MEANS


Analysis of Variance (ANOVA)
We can use two sample t-test to test the equality of more than two population means but two
means at a time, so the above procedure has following draw backs
1) The procedure requires a large number of two sample t-test which is laborious job.
2) Performing many t-test each at significance level of α tends to inflate the overall α risk.
For example, To test the equality of 10-population means, we have to perform 45 t-tests
If these tests are independent and each test use α =0.05, then overall α=45(0.05)=2.25
Therefore to overcome this difficulty, we require a procedure for carrying out test of hypothesis
about the equality of several population means simultaneously. In such situations we can use F-
distribution in ANOVA that yields a single test statistic for comparing all means so that the over
all risk of Type-I error is controlled
Analysis of Variance is a procedure that partitions the total variability present in the data set into
meaningful and distinct components. Each component represents the variation due to a
16 of 21

recognized source of variation, in addition, one component represents the variation due to
uncontrolled factors and random errors associated with the response measurements

One Way ANOVA


Four groups of students were subjected to different teaching techniques and tested at the end of a
specified period of time. Due to drop outs in the experimental groups (sickness, transfers etc) the
number of students varied from group to group
Method 1 Method 2 Method 3 Method 4
65 75 59 94
87 69 78 89
73 83 67 80
79 81 62 88
81 72 83
69 79 76
90
454 549 425 351 1779
Do the data provide sufficient evidence to indicate that a difference in the mean achievements for
the 4 teaching techniques?
Solution:-
Correction Factor=(G.T)2/Total observation= (1779)2/23 = 137601.8

TotalSS = (65)2+(87)2 …(88)2 – CF= 139511 – 137601.8 = 1909.2


(454) 2 (549) 2 (425) 2 (351) 2
BetweenMethodsSS = + + + − CF = 138314.4 − 137601.8 = 712.6
6 7 6 4
WithinMethodsSS =TotalSS - BetweenMethodsSS=1909.2 – 712.6= 1196.6

1) Construction of hypotheses
Ho : 1=2=3=4(i.e Mean achievements from 4 methods are same)
H1: At least two ’s are different
2) Level of significance
 = 5%
3) Test Statistic
2

F= S b
2
S w

A N O V A TABLE
Source Of Variation Degree of Freedom Sum of Squares Mean Sum of Squares Fcal
(S.O.V) DF SS MSS=SS/df
Between Methods 4-1 =3 712.6 237.5 S2b 3.77ns
Within Methods 22-3=19 1196.6 63.0 2
S w(MSE)
(Error)
TOTAL 23-1=22 1909.2
ns Non-Significant (Don’t reject Ho)
F.05(3,20)=3.90
4) Decision Rule:- Reject Ho if Fcal  F(3,19)
5) Result:-As Fcal =3.77 < F.05(3,19) =3.90 So don’t reject Ho and conclude that there is no
difference in the mean achievements for the four teaching methods.

Example:- The milk butterfat percentage of 4 breeds of cows is desired to be known. A random
sample of 6 Mature cows from each of 4 breeds was taken and the following data were recorded.
17 of 21

Breed 1 Breed 2 Breed 3 Breed 4


3.6 4.6 3.7 5.8
4.1 4.9 3.6 5.0
4.0 5.7 3.8 5.3
3.9 5.9 3.2 5.2
Grand Total
3.2 4.3 3.9 4.9
4.3 5.1 3.2 5.8
23.1 30.5 21.4 32.0 107.0
(1):-Test the hypothesis that the average milk butterfat percentage for four breeds are same.
(2):-Calculate Coefficient of Variation and interpret it.
(3):-Calculate Standard Error of treatment means.
(4):- Calculate Standard Error of difference between treatment means.
(5):-Construct 95% C.I for difference between treatment means of B2 & B3 and then test
significance of difference between them.
(6):-Apply Least Significant Difference Test to test the significance of difference between all
possible treatment means.
Solution:-
Correction Factor=(G.T)2/Total observation= (107)2/24 = 477.0417

TotalSS = (3.6)2+(4.1)2 …(5.8)2 – CF= 494.88-477.0417 = 17.8383


(23.1) 2 (30.5) 2 (21.4) 2 (32.0) 2
BetweenBreedSS = + + + − CF = 13.919
6 6 6 6
WithinBreedSS =TotalSS - BetweenBreedSS=17.8383-13919=3.92

1) Construction of hypotheses
Ho : 1=2=3=4([Link] average milk butterfat percentage for four breeds are same)
H1: At least two ’s are different
2) Level of significance
 = 5%
3) Test Statistic
2

F= S b
2
S w

A N O V A TABLE
Source Of Variation Degree of Freedom Sum of Squares Mean Sum of Squares Fcal
(S.O.V) DF SS MSS=SS/df
Between Breed 4-1 =3 13.919 4.640 S2b 23.67*
Within Breed 23-3=20 3.920 0.196 S2w(MSE)
(Error)
TOTAL 24-1=23 17.8383
*Significant at 5%
F.05(3,20)=3.10
4) Decision Rule:- Reject Ho if Fcal  F(3,20)
5) Result:-As Fcal > F(3,20 So reject Ho and conclude that the average milk butterfat
percentage for four breeds are not same.
MSE 0.196
(2):- C.V = x100 = = 9.92%
GrandMean 4.46
The value of CV indicates the amount of error relative to the size of the data, small value of CV
indicates the reliability of the experiment. The experiment is considered as reliable for any value
of CV less than 10%.In this example, the value of CV is not high so the experiment is reliable.
− MSE
(3):- SE( X i ) = Where ni is the number of observation in ith treatment
ni
0.196
SE(X1)=SE(X2)=SE(X3)=SE(X4)= = 0.1807
6
SEs for four treatments means are same as all the treatments have same number of observations
− − 1 1
(4):- SE( X i − X j ) = MSE( + )
ni nj
18 of 21

− − 1 1
SE( X 1 − X 2) = 0.196( + ) = 0.256
6 6
(5):-95% C.I for Difference between means of treatments B2 & B3
− −
 − −

( X 2− X 3) t  / 2 ( Edf )  SE ( X 2 − X 3  =(5.08-3.57)2.086(0.256)
 
(0.976 , 2.044)
As the confidence interval doesn’t contain Zero so the two treatments B2 & B3 are significantly
different .
(6):-When Fcal is significant, it means that there is evidence that at least two means differ from
each other. We can test the significance of difference between treatment means by constructing
confidence intervals.( if confidence interval contains 0 value then the
two means are non significant i.e. no difference between two
means). Alternatively, different methods have been developed for locating significant
differences among means after analysis of variance. The most commonly used methods are
Least Significant Difference test(LSD)
Least Tuckey’s Honestly significant difference (HSD)
Scheffe’s test
Dunnett’s test.
Duncan’s new multiple range test (DMR)
Least Significant Difference Test
Treatments means in ascending order
B3 B1 B2 B4
3.57 3.85 5.08 5.33

Comparison Difference between LSD value Result


means
B3 vs B1 0.28ns t/2,EdfSE(X3-X1)=2.086(0.256)=0.534 Non-Significant
B3 vs B2 1.51* t/2,EdfSE(X3-X2)=2.086(0.256)=0.534 Significant
B3 vs B4 1.76* t/2,EdfSE(X3-X4)=2.086(0.256)=0.534 Significant
B1 vs B2 1.23* t/2,EdfSE(X1-X2)=2.086(0.256)=0.534 Significant
B1 vs B4 1.48* t/2,EdfSE(X1-X4)=2.086(0.256)=0.534 Significant
B2 vs B4 0.25ns t/2,EdfSE(X2-X4)=2.086(0.256)=0.534 Non-Significant

B3 B1 B2 B4

OR
B3 B1 B2 B4
a a b b
The treatments means sharing same underscore or letter are non significant

Two Way ANOVA

Example:- Four breeds of cattle were fed on three different rations. Gains in weight in pounds over a
given period were recorded
B1 B2 B3 B4 Total

R1 46.5 62 41 45 194.5

R2 47.5 41.5 22 31.5 142.5

R3 50 40 25.5 28.5 144

Total 144 143.5 88.5 105 481


Is there a significant difference (a) Between Breeds (b) Between Rations

Correction Factor=(G.T)2/Total observation= (481)2/12 = 19280.08


19 of 21

Total SS = (46.5)2+(47.5)2 …(28.5)2 – CF= 20729.5 -19280.08 =1449.42


(144) 2 (143.5) 2 (88.5) 2 (105) 2
BreedSS = + + + − CF = 20061.83 − 19280.08 = 781.75
3 3 3 3
(194.5) 2 (142.5) 2 (144) 2
RationSS = + + − CF = 19718.125 − 19280.08 = 438.05
4 4 4
Error SS =Total SS- Breed SS - Ration SS=1449.42-781.75-438.05=229.63
Solution:-
1) Construction of hypotheses
Ho : 1=2=3=4 i.e All the Breeds are same
Ho : 1=2=3 i.e All the Rations are same
H1: At least two ’s are different
H1’: At least two ’s are different
2) Level of significance
 = 5%
3) Test Statistic
2

F=S 1
2
S 3
2

F'= S 2
2
S 3

A N O V A TABLE
Source Of Variation Degree of Freedom Sum of Squares Mean Sum of Squares Fcal
(S.O.V) (DF) (SS) (MSS)
Breed 4-1=3 781.75 260.75 S12 6.81
Ration 3-1=2 438.05 219.02 S22 5.72
Error 11-3-2=6 229.63 38.37 S32
TOTAL 12-1=11 1449.42

F.05(3,6)=4.76
4) Decision Rule:- Reject Ho if Fcal  F(3,6)
Reject H’o if F’cal  F(2,6) F.05(2,6)=5.14

5) Result:- As Fcal > F(3,6) So reject Ho and conclude all the breed are not same.
As Fcal > F(2,6) So reject Ho and conclude all the rations are different
20 of 21

Example:-According to a genetic model, the proportion in three groups should be p2:2pq:q2


where p+q=1. Are the data consistent with sample 9,51,45 if p=0.40.
Solution:-
1) Construction of hypotheses
Ho : The data supports the genetic model i.e the proportion is p2:2pq:q2
H1: The data does not support genetic model i.e the proportion is not p2:2pq:q2
2) Level of significance
 = 5%
3) Test Statistic 2cal
 (O − E ) 2 
 2 =    = 5
 E 
O E (O-E)2/E
09 0.16/1x105=16.8 3.621429
51 0.48/1x105=50.4 0.007143
45 0.36/1x105=37.8 1.371429
105 105 5.0
2.05(2)=5.99
4) Decision Rule:- Reject Ho if 2cal  2(k-1)
5) Result:-As 2cal < 2(k-1)So don’t reject Ho and conclude that data support the model.

Example:- Genetic theory suggested that the ratio of different types of flowers of a certain
species should be 9:3:3:1. An experiment of this nature gave 110 yellow flowers with a green
stigma, 40 yellow flowers with a red stigma, 30 white flowers with a green stigma and 15 white
flowers with a red stigma. Can we conclude that the data support the theory.
Solution:-
1) Construction of hypotheses
Ho : The data support the theory i.e the ratio is 9:3:3:1
H1: The data do not support the theory i.e the ratio is not 9:3:3:1
2) Level of significance
 = 5%
3) Test Statistic 2cal
(O − E ) 2
2 =  = 2.1509
E
O E (O-E)2/E
110 9/16x195=109.69 0.0009
40 3/16x195=36.56 0.3231
30 3/16x195=36.56 1.1779
15 1/16x195=12.19 0.6490
195 195 2.1509
2.05(3)=7.82
4) Decision Rule:- Reject Ho if 2cal  2(k-1)
5) Result:-As 2cal < 2(k-1)So don’t reject Ho and conclude that data support the theory.
Example:-A certain drug is claimed to be effective in curing cold. In an experiment on 164 people
with colds, half of them were given the drug and half of them were given sugar pills. The
patient’s reaction to the treatment are recorded in the following table. Test the hypothesis that the
two attributes are independent. Also calculate co-efficient of contingency and interpret it.
Category Helped Harmed No Effect Sub Total
Drug 92 10 10 82
(82x122)/164=61 (82x22)/164=11 (82x20)/164=10
Sugar 30 12 10 82
(82x122)/164=61 (82x22)/164=11 (82x20)/164=10

Sub Total 122 22 20 164


Solution:-
1) Construction of hypotheses
21 of 21

Ho : The two attributes are independent


H1: The two attributes are not independent
2) Level of significance
 = 5%
3) Test Statistic 2cal
(O − E ) 2
2 =  = 11.73
E
O E (O-E)2/E
92 61 5.859756
30 61 5.859756
10 11 0.006098
12 11 0.006098
10 10 0
10 10 0
164 164 11.73
2.05(2)=5.99
4) Decision Rule:- Reject Ho if 2cal  2[(r-1)x(c-1)]
5) Result:-As 2cal > 2[(r-1)x(c-1)] So reject Ho and conclude that the two attributes are not
independent.
The chi-square statistic shows only that whether the two attributes are related are not. It does not
tell any thing about the strength of the relationship which we sometimes desire to measure. For
this purpose, Karl Pearson has defined a co-efficient known as co-efficient of contingency
2 11.73
C= = = 0.258
 +n
2
11.73 + 164
k −1
The co-efficient of contingency lies between 0  C  where K is the number of rows or
k
columns which one is smaller in the contingency table.
The larger the value of C, stronger is the dependence or association between two attributes.
So in the above example 0 < C <0.707 as C=0.258, so there is moderate association between two
attributes.

You might also like