6 Inferential Statistics VI - May 12 2014

Download as pdf or txt
Download as pdf or txt
You are on page 1of 40

Inferential Statistics VI:

Hypothesis Testing I

Mr. Shital Bhandary


Assistant Professor
DCHS, PAHS-SOM
Objectives:
 Define/describe null and alternative hypothesis:
 Write a null hypothesis and an alternative hypothesis related to
group comparisons and explain their meaning in words
 Write a null hypothesis and an alternative hypothesis related to
relationships and explain their meaning in words.

 Explain the logic of testing the null hypothesis


 Define/describe purpose of a test of significance:

 Explain the probabilistic nature of a test of significance

 Discuss what is meant by acceptance or rejection of the


null hypothesis
Objectives (Contd.)
 Describe Type I and Type II errors
 Describe two correct decisions related to a test of significance
 Describe two incorrect decisions related to a test of
significance and label each as a Type I or Type II error.
 Explain the relationship between Type I errors
and alpha levels
 Describe the concept of significance level (probability level)
 Identify common probability levels used in medical and health
care research and explain the meaning of each.
 Describe one-tailed and two-tailed tests
 Describe a situation in which a two-tailed test is appropriate
 Describe a situation in which a one-tailed test is appropriate
Objectives (Contd.)
 Perform tests of hypotheses on means and
standard deviations.
 One sample test
 Two samples test

 Perform tests of hypotheses on proportions


 One sample test
 Two samples test
Background
 Decision making about the characteristics of
the population on the basis of study of the
sample taken from the population involves
the risk of taking wrong decision.
 For example, we may want to decide whether
a given food-stuff is really effective in
increasing weight, or which of the two brands
of medicine is more effective.
 In such decision making the probability theory
plays a vital role. The method of statistics
which helps in arriving at the criterion for such
decision is called Test of Hypotheses or
Hypotheses Testing.
Introduction
 In testing of hypothesis, an assumption is
made about the population parameter.

 To test whether the assumption or hypothesis


is right or not:
a random sample is selected from the population,
sample statistics (~ mean, proportion, standard error
etc.) are obtained,
observe the difference between the sample mean
and the population hypothesized value and,
test whether the difference is significant or
insignificant.
PAHS Student Smoking: Revisited

If the PAHS-SOM Dean claims that 25% of


MBBS students are current smokers then:
We need to take a random sample of students
using various sampling methods (we can not
used non-random sampling?)
Find the proportion of currently smokers from
the survey
Use suitable test (binomial, chi-square) to see
whether the difference is significant or not!
Statistically:

Smaller the difference, the sample mean is


close to the hypothesized value, and
larger the difference the hypothesized
value has low chance to be correct.

This is also influenced by the “sample


size” as large samples tend to produce
statistically significant result (but also
clinically insignificant results!)
In addition:
The computed value of the statistic may
differ from the hypothetical value of the
parameter due to sampling
fluctuations/chance.

If the difference is small, we consider that


it has arisen due to sampling fluctuations.
Hence the difference is considered to be
insignificant and the hypothesis is
accepted.
Similarly:
If the difference is large, we consider
that it has not arisen due to sampling
fluctuations but it is due to some other
reasons.

Hence the difference is considered to


be significant and we fail to accept the
hypothesis (~ rejected).
N.B.

Thus the test of hypothesis discloses the


fact whether the difference between the
computed statistic and hypothetical
parameter is significant.
General Procedure of
Testing a Hypothesis
1. Formulating the Hypothesis: In statistics, by a
hypothesis, we mean a tentative conclusion
logically drawn regarding any parameter of the
population.

2. For instance, one may hypothesize that: The MBBS


course costs more to a candidate that any other
professional course in Nepal.

3. This is a research hypothesis and it is usually


“negatively” phrased.
Alternatively:
The common way of stating a hypothesis is
“positively” phrased:

“there is no difference between the


parasitic infestation prevalence among
gender”

The term “no difference” implies that the


difference, if any, is merely due to sampling
fluctuations.
Types of Hypothesis: Division
The statistical hypothesis may be
divided into two types – Null Hypothesis
(H0) and Alternate Hypothesis (H1).

Null Hypothesis (H0): A statistical hypothesis


which is stated for the purpose of possible
acceptance is called a null hypothesis.

For example, we may hypothesize that the


average height of students of this class is 65
inch. In other words, H0 : µ = 65 inch.
Points to remember:
 If we want to test any statement about the
population we formulate the null hypothesis that
is true. For example if we want to find whether
the population mean has specified value µ0 then
we formulate the null hypothesis as: H0 : µ = µ0

 If we want to test the significance of the


difference between two sample statistics then we
formulate a null hypothesis that the difference is
just due to fluctuations of sampling. Symbolically,
H0 :µ1 = µ2
Alternative Hypothesis
 Any hypothesis which is complementary to
the null hypothesis is called an alternative
hypothesis and is denoted by H1.
 It is also known as “research hypothesis”
For example, if we want to test the null hypothesis
that the average height of the PAHS MBBS students
is 65 inch i.e. H0 : µ=65, then the alternative
hypothesis could be:
a. H1 : µ ≠ 65 (Two-tailed test)
b. H1 : µ > 65 (Right-tailed test)
c. H1 : µ < 65 (Left-tailed test)
Note: We accept H1 when we fail to accept H0.
Basis of acceptation:
Computation of Test Statistic
 After formulating the hypothesis the next step is
to calculate an appropriate test statistic which is
based on an approximate probability distribution.

 For testing whether the null hypothesis should


be accepted or rejected, we use Z-distribution
under normal curve for large sample (n > 30)
and t-distribution for small sample (n <= 30).

 For this purpose, we use z-table or t-table.


N.B. / Quick Think!
Before proceeding to use parametric tests
(z and t tests), we need to see whether the
variable of interest (e.g. height of MBBS
students) follows the “normal distribution”
using graphs, plots and test statistics.
Why?
If we find a skewed histogram, deviating
Q-Q plot and significant test statistics then
we CAN NOT use Z or t-tests.
What do we do then?
Type I and Type II Error
 A decision to accept or reject H0 is made on
the basis of the sample data and there is
always a chance of making an error.
 There are two types of errors in testing
hypothesis:
a. Type-I error (α): Reject a null hypothesis when it is
true.
b. Type-II error (β): Accept a null hypothesis when it
is false.
 In deciding whether to accept or reject H0, we
try to minimize α and β, and maximize the
probability of making correct decision 1 - α
and 1 - β.
Four possible Situation:
Hypothesis Testing
Decision
Actual Accept H0 Reject H0
H0 is true No Error Type I Error
Correct Decision Wrong Decision
Probability = 1 – α Probability = α
H0 is false Type II Error No Error
Wrong Decision Correct Decision
Probability = β Probability = 1 -β
Fixing the level of significance (α)

 The level of significance, usually denoted by


α, is the maximum probability of making type I
error. The commonly used level of
significance are 5% (0.05) and 1% (0.01).
 If we use 5%, it implies that 5 cases out of
100 cases are likely to reject H0.
 In other words, this implies that we are 95%
confident that our decision is to reject H0 is
correct.
 The level of significance should be fixed in
advance before applying the test.
Type II Error
In the previous table, β denotes the
probability of making Type II error.

The probability β is much more risky


than the probability α because we incur
greater risk in accepting the false
hypothesis than in rejecting a true
hypothesis.

Note: Type I error and Type II error are


inversely related.
Use of Type II error

Type II error is “usually” used while


determining sample size for the study

It is quite often used while determining


sample size for comparing samples from
two or more populations e.g. case-control
studies, cohort studies, clinical trails,
community trails
Decision Making:

Inferential decision making can be done


using:

Confidence interval approach

Critical Value approach

P-value approach
Finding Critical Region
(or Rejection Region)
 In hypothesis testing, the level of significance
is set up in order to know the probability of
making type I error.
 The region of the standard normal curve
corresponding to a pre-determined level of
significance that is fixed for knowing the
probability of making Type I error is called the
rejection region or critical region.
 The region of standard normal curve which is
not occupied by the rejection region is called
acceptance region.
Illustration:
Deciding Two-Tailed
or One-Tailed Test
When the sample mean is significantly
different from the population mean a two-
tail test is used.
When the population mean is considered
to be at least as large as some specified
value the right tail test is used.
When the population mean is considered
to be at least as small as some specified
value the left-tail test is used.
Making Decision:
Critical Value Approach
If T  Tα then accept (fail to reject) H0

If T > Tα then reject H0

Where,
T and Tα are the Computed and Tabulated
Values respectively.

α is the level of significance fixed a priori.


Test Statistics

X 
Z= when σ is known.

n
X 
Z= s when σ is unknown
n

pP
Z= when proportion is given
PQ
n
Summary:
State the null (H0) and alternative (H1)
hypotheses.
Select and compute the test statistic T.
Obtain the significance level α and identify
the acceptance and rejection region.
Identify the type of test, one-tailed or two-
tailed to be applied.
Make the decision by comparing computed
value of T and its tabulated value(s).
Example 1

To test whether the average KUMET score


of the KUMS students in 2004 is 65.8, a
sample of size 50 is taken from 1st to 3rd
batches and the sample mean score is
found to be 68. The population standard
deviation is 15.

Note: If the risk (α) is not given, it


should be considered as 5%.
Solution:

X 

n
Example 2
 To test the hypothesis that mothers with low
socioeconomic status (SES) deliver babies whose
birth weights are lower than normal.

 To test this hypothesis, a list of birth weights from


100 consecutive, full-term, live-born deliveries from
the maternity ward of KUTH Scheer Memorial in a
low-SES area is obtained. The mean birth weight is
found to be 2350 grams with a sample standard
deviation of 250 grams.

 Can we actually say that the underlying mean birth


weight from this hospital is lower than 2500
grams?
Solution:
 Here, H0: μ = 2500 and H1: μ < 2500 (Left Tailed
Test)
 We have, x = 2350, n = 100 and s = 250.
 Since, n > 30, we use Z-test. So,
X 
Z= s = -6 ~ 6 , Z0.05 = 1.645 (LT Value, ?)
n

 Since, Z > Zα, we reject the null hypothesis.


 In other words, there is a significant difference
between population mean and sample mean.
 That is, we can actually say that the underlying
mean birth weight from this hospital’s SES area is
lower than 2500 grams.
Exercise 14

A sample of 250 people of Ugrachandi


Nala VDC Ward Number 9 is found to
have a mean systolic BP of 121.16 with a
standard deviation of 14.684.

Can it be reasonably regarded as a


sample from a large population with mean
systolic BP of 115 at 1% risk?
Exercise 15
 On a given day, a sample of 33 consecutive patients
at PAHS Medical OPD revealed the mean pulse rate
as 75.47 per minute with a standard deviation of
5.34 per minute.
 A study conducted by the PAHS Faculty in Urban
Lalitpur found the mean pulse rate as 72 per minute.

 Test the claim of PAHS hospital at 1% level of


significance that the mean pulse rate of its patients
are greater than other living in the Urban Lalitpur
district.

 Interpret the result carefully considering the different


types of bias that may affect this finding.
Exercise 16
 A topic of recent clinical interest is the possibility
of using drugs to reduce infract size in patients
who have had a myocardial infraction within the
past 24 hours.
 Suppose we know that in untreated patients the
mean infract size is 25 (ck – g - EQ/m2) with a
standard deviation of 10.
 In a research with 80 patients treated with a
certain drug, the mean infract size is found as
16.
 Is the drug effective in reducing infract size?
Exercise 17

A manufacturer claimed that at least 95%


of the machine parts that is supplied to the
PAHS, Patan Hospital conformed to
specifications.
An examination of 200 such parts revealed
that 180 parts were not faulty.
Determine if the manufacturer’s claim is
legitimate at 1% level of significance.
Question / Queries
Thank you !!!

You might also like