You are on page 1of 19

Testing of hypothesis

Descriptive vs. Inferential Statistics


Descriptive
quantitative descriptions of characteristics
Inferential Statistics
Drawing conclusions about parameters ~
What is a Hypothesis?

A hypothesis is an assumption about the population


parameter.
Elements of a hypothesis test:

Null hypothesis
Alternative hypothesis
Test statistic
Critical or Rejection region
Level of significance
One sample t test for mean

Used in the case of small samples (<30 on an average)


and also when the population S.D. is not known. (i.e. the
sample has been drawn from the population of given
mean and unknown variance.
Developed by W.S. Gossett.
Ho :   
o
Assumptions
Population is normally distributed
t test statistic, with n-1 degrees of freedom

X 
t
S
n
Where, x = sample mean
 = population mean under null hypothesis

n 2
s = sample S.D. = 1

n  1 i 1
( xi  x)
n = sample size
t t (n-1)

DECISION RULE : reject Ho if the calculated value of t lies in the


rejection region and accept otherwise.
Example
It is required to test whether the temperature required
to damage a computer on an average is less than 110
degrees. Bz of the price of testing, a sample of twenty
computers was tested to see what minimum
temperature would damage the computer. It was
observed that the damaging temperature averaged 109
degrees with a S.D. of 3 degrees.use 5% level of
significance to test if the damaging temperature is less
than 110 degrees.
Example
A restaurant near a railway station has been having average
sales of 500 cups of tea per day. Currently, because of the
development of a bus stand nearby, the owner expects to
increase his average per day sales. During the first 12 days
after the inauguration of the bus stand the daily sales were
observed to be :
550,570,490,615,505,580,570,460,600,580,
530,526
On the basis of this sample information can one conclude that
the restaurant’s sales have increased at 5% level of
significance? Test the hypothesis by using confidence
interval.
Two sample t test for difference of two means(preferred over z
test when sample size is <30 and pop. Variances are unknown)

Suppose we want to test if two independent samples of sizes


n1 and n2 have been drawn from two normal populations with
mean respectively.
1and 2
Assumption :
 12   22   2
H0: 1   2
Test statistic: t  ( x1  x2 )  ( 1   2 )
1 1
S (  )
n1 n2
DECISION RULE :
reject null hypothesis if the calculated statistic is larger
than the tabulated statistic, at n1 + n2-2 degrees of
freedom and the required level of significance.
EXAMPLE
A random sample of 12 families in one city showed an
average monthly food expenditure of Rs. 1380 with a
s.d. of Rs. 100 and a random sample of 15 families in
another city showed an average monthly food
expenditure of Rs. 1320 with a s.d. of Rs. 120. Test
whether the difference between the two means is
significant at 0.01 level of significance.
EXAMPLE
The mean life of a sample of 10 electric light bulbs
was found to be 1456 hours with s.d. of 423 hours. A
second sample of 17 bulbs chosen from a different
batch showed a mean life of 1280 hours with s.d. of
398 hours. Is there a significant difference between the
means of the two batches.
Paired t test( for correlated or dependent
samples)
Used to test the difference of two population means
when the two samples are correlated i.e. there exist
one-to-one correspondence between the values of the
sample.
Example : suppose we want to test the efficiency of a
drug. Let xi and yi (i=1,2…..,n) be the readings in hrs of
sleep before and after the drug is given.
di = xi - yi
Null hypothesis is there is no significant difference in the
means of two related samples
Ho :
1   2  0
H1 : 1   2
n
d   di / n
i 1
n
s  (d
i 1
i  d ) /(n  1)
2

follows Student’s t-distribution with (n-1) d.f.


Example
The Peak Expiratory Flow Rate (PEFR)of 9 asthma
patients was taken before and after a walk on an
extremely cold winter day for comparing the rates. The
following data was obtained:
Before: 312,242,340,388,296,254,391,402,290
After :300,201,232,312,220,256,328,330,231
Test whether there is any significant difference between the
PEFR of asthma patients before and after a walk on a cold
winter day.
Example
 A company is concerned about the decline in its sales
revenues. After an analysis, the management concluded
that the employee attitudes had become negative due to
increased competition and excessive workload. The
management organized a 7 day special motivational
programme. In order to analyse the effectiveness of the
motivational programme, the company researchers have
administered a well-designed questionnaire to 12
employees selected randomly. Take 90% as the confidence
level and examine whether the motivational programme
has changed the attitude of the employees.
Scores before the programme Score after the programme
25 29
26 30
25 31
27 30
28 31
25 32
29 33
27 31
30 32
28 30
29 31
25 32

You might also like