0% found this document useful (0 votes)
11 views

Chapter 4 Inferential

Uploaded by

sayihmehari74
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)
11 views

Chapter 4 Inferential

Uploaded by

sayihmehari74
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/ 126

Chapter 4: Estimation and Hypothesis Testing

Teresa K.(Bsc., MPH)


Teresa K.
Inferential Statistics

is the process of generalizing or drawing


conclusions about the target population on
the basis of results obtained from a sample.

Teresa K.
Basic terms

 Parameter: The true quantities of the population


(which are rarely known for certain).

 Statistic: is a quantity calculated from a sample,


which describes a particular feature or Descriptive
measure obtained from a sample. E.g. if we want to
know the mean age of all Egyptian bladder cancer
cases, We take a portion of bladder cancer cases and
calculate the mean age.

Teresa K.
Inferential Statistics cont’d…

How information from the sample is linked to the


population?
Via sampling distribution
Sampling distribution:
- This is not the distribution of sample.
- It is the distribution of a statistic.
- The frequency distribution of the statistic taken
over all possible samples.
Procedure:
If we take many, many samples and get the
statistic for each of those samples, the
distribution of all those statistic is the sampling
distribution.
Teresa K.
Properties of Sampling Distribution
Three things about sampling distribution of a statistic
Its mean
Its variance
Its shape
If we repeatedly take sample of the same size n from a
population the means of the samples form a sampling
distribution of means of size n is equal to population
mean.
In practice we do not take repeated samples from a
population i.e. we do not encounter sampling
distribution empirically, but it is necessary to know their
properties in order to draw statistical inferences.

Teresa K.
The Central Limit Theorem

Regardless of the shape of the frequency distribution


of a characteristic in the parent population, the means
of a large number of samples (independent
observations) from the population will follow a normal
distribution (with the mean of means approaches the
population mean μ, and standard deviation of σ/√n ).

Teresa K.
The central limit theorem cont’d...

The central limit theorem states that the sampling


distribution of any statistic will be normal or nearly
normal, if the sample size is large enough.

How large is "large enough"?

As a rough rule of thumb, many statisticians say that a


sample size of 30 is large enough for continuous data

Teresa K.
The central limit theorem cont’d…

Sampling Distribution of the mean: Suppose we choose


a random sample of size n, the sampling distribution of
the sample mean posses the following properties.
– The sample mean will be an estimate of the
population mean μ.
– The standard deviation of is σ/√n (called the
standard error of the mean).
– Provided n is large enough the shape of the sampling
distribution of is normal.

Teresa K.
Sampling Distribution of the proportion

Suppose we choose a random sample of size n, the


sampling distribution of the sample proportions p posses
the following properties.

 The sample proportion p will be an estimate of the


population proportions p.
 The standard deviation of p is: p (1  p)

n
(called the standard error of the proportion).
 Provided n is large enough the shape of the sampling
distribution of p is normal.
Teresa K.
Sampling Distribution of the proportion cont’d...

In this case, np ≥ 5 and nq ≥ 5 are the requirements


for sufficiently large n ( central limit theorem for
proportions) .

Teresa K.
Standard deviation and Standard error

Standard deviation is a measure of variability between


individual observations (descriptive index relevant to
mean)
Standard error refers to the variability of summary
statistics (e.g. the variability of the sample mean or a
sample proportion)
Standard error is a measure of uncertainty in a sample
statistic. i.e. precision of the estimate of the estimator

Teresa K.
Parameter Estimations

In parameter estimation, we generally assume that the


underlying (unknown) distribution of the variable of
interest is adequately described by one or more
(unknown) parameters, referred as population
parameters.

As it is usually not possible to make measurements on


every individual in a population, parameters cannot
usually be determined exactly.

Instead we estimate parameters by calculating the


corresponding characteristics from a random sample
estimates .
Teresa K.
Estimation cont’d …

Estimation is a procedure in which we use the


information included in a sample to get inferences
about the true parameter of interest.
An estimator is a statistic that is used to estimate an
unknown population parameter.
There are two types of estimation:
1. Point estimation: is a specific numerical value
estimate of parameter.
It uses the information in the sample to arrive at a
single number (that is called an estimate) that is
intended to be close to the true value of the
parameter.
Teresa K.
Estimation cont’d …

2. Interval estimation: An interval estimate of a


parameter is a range of values used to estimate the
parameter.
It uses the information of the sample to end up at
an interval (i.e. construct 2 endpoints) that is
intended to enclose the true value of the parameter.

Teresa K.
Point Estimation

Estimator is a rule (formula) that tells us how to calculate


the value of an estimate based on the measurements
contained in a sample.
Suppose we want to estimate the true (population)
mean, μ, of a random variable X , from a sample Xi, i = 1,
2, ...n.
One possible point estimator is the sample mean
n

 x i
x = i1
n
Teresa K.
Point Estimation cont’d …

For the same population parameter many different


estimators may be used.
For instance, apart from the sample mean, the
median, or the mode can be used as estimators for
the true parameter.

Teresa K.
Teresa K.
Point estimations cont’d …

• So, some of the point estimates are:


– Point estimate for the population mean µ is
sample mean.
– Point estimation for population standard deviation
σ is sample standard deviation s.
– Point estimation of population P is sample
proportion p and so on.

Teresa K.
Point estimations cont’d …

• However, there are pitfalls of point estimation.


These are
– As we have seen under sampling distribution
section, different samples end with different
estimate for a single unknown population
parameter. Therefore point estimate does not take
sample to sample variability into account.
– Point estimate does not give the precision of the
estimate and hence we need another method of
estimation which handles these problems.

Teresa K.
Example

The mean survival time of 91 laboratory rats after


removal of the thyroid gland was 82 days with a
standard deviation of 10 days (assume the rats were
randomly selected).
In the above example, the point estimates for the
population parameters µ and δ ( with regard to the
survival time of all laboratory rats after removal of the
thyroid gland) are 82 days and 10 days respectively.

Teresa K.
Interval Estimation

A confidence interval for a parameter is an interval


computed from sample data containing the true value
of the parameter within a certain level of confidence.
It consists of three parts:
A confidence level,
The statistic and margin of error.
Interval estimators are commonly called confidence
intervals.
The confidence coefficient identifies the fraction of the
time (e.g. 95% of the times), in repeated sampling, that
the interval constructed will
Teresa K.
contain the true parameter
That is, if we take 100 samples, we expect the true
value of the parameter to lie within the calculated
intervals in 95 of them (and not to lie within the
intervals in 5 of them).

Teresa K.
Meaning of confidence Interval

Teresa K.
Interval Estimation cont’d …

Confidence interval takes into account the sample to


sample variation of the statistic and gives the measure
of precision.
The general formula used to calculate a Confidence
interval is:
CI = Estimate ± K × Standard Error, k is called
reliability coefficient
Most commonly the 95% confidence intervals are
calculated, however 90% and 99% confidence intervals
are sometimes used.

Teresa K.
Interval Estimation cont’d …

 The term z /2 ( ) is called the maximum error of
the estimate. n

The maximum error of the estimate is the maximum


difference between the point estimate of a parameter
and the actual value of the parameter.

Teresa K.
Interval estimation cont’d…

Teresa K.
Elements Of confidence Interval Estimation

 Level of confidence

•Confidence in which the interval will contain


the Unknown population parameter

Precision (range)

•Closeness to the unknown parameter

Teresa K.
Teresa K.
Confidence interval cont’d…

90% CI is narrower than 95% CI since we are only 90%


certain that the interval includes the population
parameter.

On the other hand 99% CI will be wider than 95% CI; the
extra width meaning that we can be more certain that
the interval will contain the population parameter. But
to obtain a higher confidence from the same sample,
we must be willing to accept a larger margin of error (a
wider interval).

Teresa K.
Confidence interval cont’d…

For a given confidence level (i.e. 90%, 95%, 99%) the


width of the confidence interval depends on the
standard error of the estimate which in turn depends on
the:
1. Sample size:-The larger the sample size, the
narrower the confidence interval (this is to mean
the sample statistic will approach the population
parameter) and the more precise our estimate. Lack
of precision means that in repeated sampling the
values of the sample statistic are spread out or
scattered. The result of sampling is not repeatable.
Teresa K.
Confidence interval cont’d…

To increase precision (of an SRS), use a larger sample.


You can make the precision as high as you want by
taking a large enough sample. The margin of error
decreases as √n increases.

2. Standard deviation:-The more the variation among


the individual values, the wider the confidence
interval and the less precise the estimate. As sample
size increases standard error decreases.

Teresa K.
The t-distribution

When n < 30 and δ is unknown?


We will use a t-distribution which depends on the
number of degrees of freedom(df.).
The t-distribution is a theoretical probability
distribution (i.e, its total area is 100 percent)

Teresa K.
The t-distribution cont’d…

The t-distribution is symmetrical, bell-shaped, and


similar to the normal but more spread out.
For large sample sizes (n ≥ 30), both t and Z curves
are so close together and it does not much matter
which you use.
As the degrees of freedom decrease, the t-
distribution becomes increasingly spread out
compared with the normal.

Teresa K.
The t-distribution cont’d…
Degrees of Freedom
As explained earlier, the t-distribution involves the
degrees of freedom (df).
It is defined as the number of values which are free
to vary after imposing a certain restriction on your
data.
Example: If 3 scores have a mean of 10, how many of
the scores can be freely chosen?
Solution
The first and the second scores could be chosen freely
(i.e., 8 and 12, 9 and 5, 7 & 15, etc.) But the third score
is fixed (i.e., 10, 16, 8, etc.)
Hence, there are two degrees of freedom.
Teresa K.
The t-distribution cont’d…
Table of t-distributions
The table of t-distribution shows values of t for
selected areas under the t curve.
Different values of df appear in the first column. The
table is adapted for efficient use for either one or
two-tailed tests.
Example 1. If df = 8, 5% of t scores are above what
value?
Example 2. Find to if n =13 and 95% of t scores are
between –to and +to.
Example 3. If df =5, what is the probability that a t
score is above 2.02 or Teresa
below K.
-2.02?
The t-distribution cont’d…
Solutions
1. Look at the table (t-distribution ). Along the row
labeled “one tail” to the value 0.05; the intersection
of the 0.05 column and the row with 8 in the df
column gives the value of t = 1.86.
2. df =13-1 = 12. If 95% of t scores are between -to and
+ to, then 5% are in the two tails. Look at the table
along the row labeled “two tail” to the value 0.05;
the intersection of this 0.05 column and the row
with 12 in the df column gives to = 2.179.
3. Two tails are implied. Look along the “df =5” row to
find the entry 2.02. The probability is 0.10 .
Teresa K.
Characteristics of the t distribution

 The t distribution is similar to The t distribution differs


the standard normal from the normal distribution
distribution(Z) in the following in:
ways: 1. The variance is greater than
1. It is bell shaped. one
2. It is symmetrical about the 2. The t distribution is actually
mean. a family of curves based on
the concept of degree of
3. The mean, median, and freedom, which is related to
mode are equal to 0 and sample size.
located at the centre. 3. As sample size increase, the
4. The curve never touches t distribution approaches
the x axis the standard normal
Teresa K.
distribution(z).
Confidence interval for a single mean (for continuous
variable )

 Interval estimation for mean


– A (1 - α)100% confidence interval estimation for
the unknown population mean can be defined as:

 
CI = ( x - z /2 , x + z /2 )
n n

Teresa K.
Confidence interval for a single mean cont’d…

Formula for a specific confidence interval for the


mean when ơ is Unknown and n < 30

s s
CI = (x - t/2, n-1 , x + t/2, n-1 )
n n
Where, n-1 = degree of freedom for student’s t-
distribution and s = sample standard deviation.

Teresa K.
Confidence interval for a single mean cont’d…

When to use tα/2 or zα/2 for finding confidence interval

Is σ known? yes Use zα/2 values


no maters what the sample size is,*
No
Is n ≥ 30 yes Use zα/2 values and
s in place of σ in the formula.

No
Use tα/2 values and s in the formula.**

*Variable must be normally distributed when n < 30.


** variable must be approximately normally distributed.
Teresa K.
Interval estimation for difference of mean

The point estimation for the difference of two means,


µ1-µ2, is given by x - x .

A(1 - α)100% confidence interval estimation for the


difference of means µ1-µ2 , is defined as:

  
2 2
 
2 2 
CI = (x1 - x2 ) - z/2  , (x1 - x2 ) + z/2  
 n n n n 
 1 2 1 2 

Teresa K.
Interval estimation for difference of mean cont’d…

• Where ,
2 2

n1 n2

The standard deviation of the sampling distribution


of differences of means, also called the
standard error of differences of means.

Teresa K.
Interval estimation for difference of mean cont’d…

If the sample size is less than 30 and the population


standard deviations are not given, then the
confidence interval estimation will take t-distribution
instead of z as:

 s12 s22 s12 s22 


CI = (x1 - x2) - t/2, n1 + n22  , (x1 - x2) + t/2, n1 + n22  
 n n n n 
 1 2 1 2 

Where as: n1+n2-2 = degree of freedom for


student’s t-distribution.
Teresa K.
Interval estimation for single proportion

The point estimate for population proportion π is given


by p.
A (1-α)100% confidence interval estimate for the
unknown population proportion π is given by:

 
CI =  p  Z  (1 ) / n, p  Z  (1 ) / n 
 2 2 
When np and nq are greater than or equal to 5
Teresa K.
Confidence interval for the difference of two
proportions
The point estimate for the difference of two
population proportion, π1- π2 is given by p1-p2.
A(1-α)100% confidence interval estimate for the
difference of population proportions, p1-p2 is given
by:

 1(11) 2(12) 1(11) 2(12) 


CI =  (p1  p2) Z  , (p1  p2) Z  
 2
n1 n2 2
n1 n2 

Teresa K.
In general the width of confidence interval depends
on:
Sample size,
Level of confidence and
The standard error.

Teresa K.
Examples
Example 1
A SRS of 36 apparently healthy subjects yielded the
following values of urine excreted (milligram per day);
0.007, 0.03, 0.025, 0.008, 0.03, 0.038, 0.007, 0.005,
0.032, 0.04, 0.009, 0.014, 0.011, 0.022, 0.009, 0.008,
0.012, 0.03, 0.05, 0.009, 0.008, 0.007, 0.006, 0.02,
0.034, 0.007, 0.008, 0.036, 0.007, 0.023, 0.011, 0.012,
0.022, 0.03, 0.04, 0.04
Compute point estimate of the population mean

Teresa K.
Example 1 cont’d…
If x 1 , x 2 , ..., x n are n observed values , then
n

 xi
0 . 704
x = i =1
  0 . 0196
n 36
Construct 90% and 95% confidence interval for the
mean:
90%CI =(0.0196-1.65x0.0123/6, 0.0196+1.65x0.0123/6)
=(0.0134, 0.0235)

95%CI=(0.0196-1.96x0.0123/6,0.0196+1.96x0.0123/6)
=(0.0124, 0.0245)
Teresa K.
Example 2
The mean diastolic blood pressure for 225 randomly
selected individuals is 75 mmHg with a standard
deviation of 12.0 mmHg. Construct a 95% confidence
interval for the mean
Solution
n=225
mean =75mmhg
Standard deviation=12 mmHg
confidence level 95%
The 95% confidence interval for the unknown population mean is
given
95%CI = (75 ±1.96x12/15) = (73.432,76.56)
Teresa K.
Example 3
In a survey of 300 automobile drivers in one city, 123
reported that they wear seat belts regularly. Estimate
the seat belt rate of the city and 95% confidence
interval for true population proportion.

Solution
The point estimate of p = 123/300
=0.41 (41%)

95% CI Estimate of p for the seat belt of the city:


95% CI = p ± zα/2 × (√(p(1-p) /n))
=0.41 ± 1.96× (√0.41(1-0.41) /300)
=(0.35,0.47) Teresa K.
Example 4

If a random sample of 50 non-smokers have a mean


life of 76 years with a standard deviation of 8 years,
and a random sample of 65 smokers live 68 years with
a standard deviation of 9 years,
A. What is the point estimate for the difference of the
population means?
B. Find a 95% C.I. for the difference of mean lifetime of
non-smokers and smokers.

Teresa K.
Given
Population 1 (non-smokers)
n 1=50 , = 76, S1 = 8,

δ2 =

= 82/50 =1.28 years


Population 2 (smokers)
n 2= 65 , = 68, S2 = 9,

δ2 =

= 92/65 =1.246 years

Teresa K.
Example 4

Solution
A. The point estimation of the difference of mean is:
point estimation of the difference = -
= 76 – 68
=8
B. 95% CI
CI =

= (8-1.96*1.28, 8+1.96*1.246)
=(5.491,10.442)
Teresa K.
Example 5
Each of two groups consists of 100 patients who
have leukemia. A new drug is given to the first group
but not to the second (the control group). It is found
that in the first group 75 people have remission for 2
years; but only 60 in the second group.

Find 95% confidence limits for the difference in the


proportion of all patients with leukemia who have
remission for 2 years.

Teresa K.
Example 5 cont’d ….

Solution
Note that
n1p1=100*0.75=75>5
n1q1 = 100*0.25=25>5
n2p2 = 100*0.60=60>5
n2q2 =100*0.40=40>5
p1 = 0.75, q1 = 0.25, n1=100
p2 = 0.60, q2= 0.40, n2=100
δ21 = p1q1/n1 = 0.75*0.25/100= 0.001875
δ22 = p2q2/n2 =0.60*0.40/100= 0.0024
Hence, δ2(1-2) = 0.001875+ 0.0024 = 0.004275
δ(1-2) = = 0.0653
Teresa K.
Example 5 cont’d ….

At a 95% Confidence level, Z = ± 1.96


The difference of the two independent random samples
is (0.75 - 0.60) = 0.15 .
Therefore, a 95 % C.I. for the difference in the proportion
with 2-year remission is:
95%CI = (0.15 ± 1.96 (0.065) ) = (0.15 ± 0.13)
= (0.02,0.28).

Teresa K.
More exercises
In a hospital, the mean noise level in the 170 ward areas
was 58.0 decibels and the standard deviation was 4.8.
Find 95% confidence interval for the true mean?
In Addis Ababa, a survey of 350 students showed that
28% carried their lunch to school. Find the 95% CI for
the true population proportion of students who carried
their lunch to school?
A recent study in Gondar from 100 people found that 22
were obese. Find the 95% confidence interval for the
true population proportion?

Teresa K.
Exercises

1. In a sample of 125 experimental subjects, the mean


score on a post-experimental measure of aggression
was 55 with a standard deviation of 5. Construct a
95% confidence interval for the population mean.

2. The mean weight of 100 men in a particular heart


study is 61 kg with a standard deviation of 7.9 kg.
Construct a 95% confidence interval for the mean.

Teresa K.
3. The standard hemoglobin reading for normal males of
adult age is 15 g/100 ml. The standard deviation is
about 2.5 g/100 ml. For a group of 36 male
construction workers, the sample mean was 16 g/100
ml.
– Construct a 95% confidence interval for the male
construction workers. What is your interpretation of
this interval relative to the normal adult male
population?
– What would the confidence interval have been if the
above results were obtained based on 49
construction workers?

Teresa K.
HYPOTHESIS TESTING

The formal process of hypothesis testing provides us


with a means of answering research questions.

Hypothesis is a testable statement that describes the


nature of the proposed relationship between two or
more variables of interest.
It is a conjecture about a population parameter.

The purpose of the study is to collect data which will


allow the researcher to test the hypothesis.
Teresa K.
Hypothesis Testing cont’d…

This statement (assumption) may or may not be true.


Statistical tests can prove (with a certain degree of
confidence), that a relationship exists.
The best way to determine whether a statistical
hypothesis is true would be to examine the entire
population.
Since that is often impractical, researchers typically
examine a random sample from the population.

Teresa K.
Example of Hypothesis?

A hypothesis is an
assumption about the Example of hypothesis
population parameter. I assume the mean GPA of this
class is 3.5!
– A parameter is a
characteristic of the
population, like its mean or
variance.
– The parameter must be
identified before analysis.

© 1984-1994 T/Maker Co.


Examples of hypothesis cont’d…

The mean height of Gondar College of Medical


Sciences (GCMS) students’ is 1.63m.
There is no difference between the distribution of Pf
and Pv malaria in Ethiopia (i.e. are distributed in
equal proportions.)
Hypothesis Testing cont’d…

Types of hypothesis;
1. The null hypothesis:
Null hypothesis (represented by HO) is the
statement about the value of the population
parameter. That is the null hypothesis postulates
that ‘there is no difference between factor and
outcome’ or ‘there is no an intervention effect’.
It is the main hypothesis which we wish to test .
pronounced
H “nought”

H0: parameter = hypothesized value.


Teresa K.
Hypothesis Testing cont’d…

HO is always a statement about a parameter ( mean,


proportion, etc. of a population).
It is not about a sample, nor are sample statistic used in
formulating the null hypothesis.
HO is about an equality ( µ = 1.63m) rather than an
inequality ( µ ≥ 1.63m or µ < 1.63m).
The null hypothesis (H0) will always state that the
parameter equals the value specified in the
alternative hypothesis (H1)

Teresa K.
Hypothesis Testing cont’d…

2. The alternative hypothesis: The alternative hypothesis,


(represented by HA or H1) , contains the values of the
parameter we accept if we reject the null.
It states the ‘opposing’ view that ‘there is a
difference between factor and outcome’ or ‘there is
an intervention effect’.
Example:
Null hypothesis (HO): there is no association between
variable A and B.
Alternative hypothesis(HA): there is an association
between variable A and B.
But, taking a sample we can reject or accept the former
(the null) statement.
Teresa K.
Hypothesis Testing cont’d…

Choosing the Alternative Hypothesis (HA)


HA must also be formulated before a sample is
tested, so it, like the null hypothesis (HO), does not
depend on sample values.
If the mean height of GCMS students is
questioned as:
HO: µ = 1.63m,
Then the alternative hypothesis is set as:
–HA :µ ≠ 163 m.
–HA : µ > 1.63 m.
– HA : µ < 1.63 m.
Teresa K.
Hypothesis Testing cont’d…

 Possible choices of HA :
If Ho is Then HA is
µ = A(single mean) µ ≠ A or µ < A or µ > A
P = B(single proportion) p ≠ B or p < B or p> B
µ1- µ2 = C (difference of means) µ1- µ2 ≠ C or µ1- µ2 < C or µ1- µ2 > C
P1-p2 = D(difference of proportion) P1-p2 ≠D or p1-p2 < D or P1-P2 > D

Where: A,B, C, and D are constants

Teresa K.
Hypothesis Testing cont’d…
Exercises
State HA and HO for each of the following
1. Is the average height of the GCMS students 1.63
m or is it more?
2. Is the average height of the GCMS students 1.63
m or is it less?
3. Is the average height of the GCMS students 1.63
m or is it something different?
4. There is a belief that 10% of the smokers develop
lung cancer in country x.
5. Are men and women infected by malaria in equal
proportions, or is a higher proportion of men get
malaria in Ethiopia?
Teresa K.
Hypothesis Testing cont’d…

Level of significance
A method for making a decision must be agreed
upon.
If HO is rejected, then HA is accepted.
How is a “significant” difference defined?
A null hypothesis is either true or false, and it is
either rejected or not rejected.
No error is made if it is true and we fail to reject it, or
if it is false and rejected.
An error is made, however, if it is true but rejected,
or if it is false and we fail to reject it.
Teresa K.
Hypothesis Testing cont’d…

A random sample of size n is taken and the information


from the sample is used to reject or accept (fail to
reject) the null hypothesis.
It is not always possible to make a correct decision since
we are dealing with random samples.
Therefore, we must learn to live with probabilities of
type I (α) and type II (β) errors.

Teresa K.
Hypothesis Testing cont’d…

Error in hypothesis Testing

Teresa K.
Hypothesis Testing cont’d…

Type I Error: A type I error occurs when one rejects the


null hypothesis while it is true.
The probability of a type I error is the level of
significance of the test of hypothesis, and is
denoted by α.
Type II Error: A type II error occurs when one rejects
the alternative hypothesis (fails to reject the null
hypothesis) when the alternative hypothesis is true.
The probability of a type II error is denoted by β.

Teresa K.
Hypothesis Testing cont’d…

When we test the hypotheses, we can never be 100%


certain of our conclusions.
We can only be confident to a certain level - hopefully
a high one.

The level of significance(α) is the maximum


probability of commuting a type I error

Teresa K.
Hypothesis Testing cont’d…

In practice, the level of significance ( α ) is chosen


arbitrarily and the limits for accepting Ho are
determined.
The form of HA will determine the kind of test to be set
up (either one tailed or two tailed tests ) .
Consider the situation when HA includes the symbol " ≠".
That is, HA: µ ≠ …,P ≠ …, µ1-µ2 ≠ ….,P- P ≠ …. etc (two
tailed test)

Teresa K.
Level of Significance, and the Rejection Region

One tailed test


Critical
H 0: Value(s)
H 1: <
0
Rejection Regions

H 0:
H 1: > 0
/2
H 0:
H 1: 
0
Two tailed test
Teresa K.
What Do We Test

Effect or Difference we are interested in


– Mean and proportion in the population
– Difference in Means or Proportions
– Odds Ratio (OR)
– Relative Risk (RR)
– Correlation Coefficient

Teresa K.
Hypothesis testing for population mean
For the given null hypothesis, Ho: µ = µo
we could have three different alternative hypothesis.
These are:

The first types of hypothesis test is known as two tailed,


while the last two types of hypothesis testing are called
one-tailed test.
The classification depends on the number of rejection
areas the given test will have.
Teresa K.
Hypothesis testing for population mean cont’d…

In case of the two tailed test, we will have two rejection


area (extreme left and extreme right), however for the
second two alternative hypothesis we have only one
region of rejection, either right or left extreme.

Teresa K.
Steps for two tailed Test
Test procedure for two tailed test
1. state the null hypothesis: H0: µ =µ0
2. state the alternative hypothesis:H1:µ≠µ0
3. fix the level of significance(α) and construct the
test statistics under the null (assuming the null
hypothesis is true) as:
x  µ0
z =
se
note that: this is not the only test statistics.
depending on the type of data and sample size, we
may need to compute z-score, t-score or x2-score
For large samples (n≥30), the test statistic has
standard normally distribution
z ~ N (0, 1) Teresa K.
Steps for two tailed Test cont’d…

 For small sample (n<30) and if the true variance (σ2)


is unknown. the test statistic is distributed as a
student t-distribution with n-1 degrees of freedom.
 if the interest is to check the presence or absence of
association then x2_ score distribution will be used

Teresa K.
4. Find the critical values corresponds to the given alpha
(α) from the distribution table.
5. Decision rule: For the hypothesis which is two tailed,
the decision is defined by:
Reject the null Hypothesis if:

x - o
zcal = > ztab = z /2
SE
Do not reject the null hypothesis if:
x - o
zcal = < ztab = z /2
SE
Teresa K.
Alpha ( ) vs. critical value.
The α-level is represented by
the clouded areas.
Sample results in this area lead
to rejection of H0.

Region of
DOUBT Region of
/rejection DOUBT /rejection
region region

Acceptance region

Critical value

Teresa K.
Example:

– The average age of staffs of university of Gondar is


30 years with variance of 20 years. To check this
assumption a graduating MPH student wants to
proof whether the assumption made about average
age is true or not. He took a random sample of 10
staffs and found the average age (mean) of 27
years. Test that the average age of the staffs is 30
years.
Solution: Test procedure:
1.Null hypothesis: Ho: µ = 30
2.Alternative hypothesis: HA: µ ≠ 30

Teresa K.
Example: cont’d…

3. Test statistics:
x - o 27 - 30
Z = = = -2.12
SE 20
10
4. Critical value: is Z value with level of significance α/2 =
0.025 if the test is two test. Thus the value of Zα/2 = Z0.025
= 1.96. So, the critical value will be ±Zα/2 = ±1.96.
Therefore we will reject the null hypothesis if the
calculated value of z is less than -1.96 or greater than
+1.96. let us illustrate this using the following normal
curve:

Teresa K.
Test procedure for one tailed test

Test procedure for one tailed test is similar with that of


the two tailed test except at some steps
1. State the null hypothesis Ho: µ = µo
2. State the alternative hypothesis: H1: µ < µo or H1: µ >
µo.
The choice of the two type depends on the objective of
the test. If we are interested to check whether the true
parameter is less than the hypothesized value, then we
will choose H1: µ < µo as our alternative. However, if
the interest is to check whether the true parameter is
greater than the hypothesized value, then H1: µ > µo
will be chosen as the alternative.
Teresa K.
Test procedure for one tailed test cont’d…

3. Fix the level significance (α) and construct the test


statistic: this step is the same with that of two
tailed test. In addition, the choice of the test
statistic is also the same. That is the test statistics
for one test is defined as:

x - o
Z =
SE

Teresa K.
Test procedure for one tailed test cont’d…

4. Find the critical values in the tails of distribution of


the test statistic that given for the 95% distribution.
The critical value can be obtained from the
distribution table of the test statistic.
– Hence the critical value is the value of Z at level of
significance α = 0.05.
• If the alternative hypothesis is H1: µ< µo, then the
critical value is given by ztab = -zα, while
• If the alternative hypothesis is H1: µ > µo, then the
critical value is given by ztab = zα.
Teresa K.
Test procedure for one tailed test cont’d…

• Not that these values are the values from the


distribution table of the test statistic at the given
value of level of significance.
5. Decision rule: as the alternative hypothesis is one
tailed, the followings are the rules:
• If the alternative hypothesis is H1: µ < µo, then
the decision should be:
–Reject the null hypothesis if

x - o
Z cal = < z
SE
Teresa K.
Test procedure for one tailed test cont’d…

• Otherwise do not reject the null hypothesis if:


x -
z cal = > z
SE
• If the alternative hypothesis is H1: µ > µo, then the
decision will be:
– Reject the null hypothesis if:
x -
z cal = > z
SE
– Otherwise do not reject the null hypothesis if:
x -
z cal = < z
SE
Teresa K.
Example:

Consider the above example, but now with different


objective. The objective is to check whether the true
average of the staffs is greater than 30years or not
Solution: Test procedure:
1.Null hypothesis: Ho: µ = 30
2.Alternative hypothesis: HA: µ > 30

Teresa K.
Example: cont’d …

3. Test statistics:
x - o 27 - 30
Z = = = -2.12
SE 20
10

4. Critical value: is Z value with level of significance α/2 =


0.05 if the test is one tail. Thus the value of Zα = Z0.05 =
1.65. So, the critical value will be Zα = 1.65. Therefore we
will reject the null hypothesis if the calculated value of z
is grater than 1.65. as -2.12 is less than 1.65, the decision
is do not reject the null hypothesis.
Teresa K.
Or acceptance
region

Critical value

Teresa K.
Comparison of two Means
The purpose of this section is to extend the arguments
of the single mean to the comparison of two sample
means.
In the comparison of two means, there are two
samples of observations from two underlying
populations (often treatment and control groups)
whose means are denoted by µt and µc and whose
standard deviations are denoted by δt and δc

Teresa K.
The relevant null hypothesis is that the means are
identical, i.e.,
HO: µt= µc or HO : µt- µc = 0
The rationale for the test of significance is as before.
Assuming the null hypothesis is true (i.e., that there is
no difference in the population means), one determines
the chance of obtaining differences in sample means as
discrepant as or more discrepant than that observed.
If this chance is sufficiently small, there is reasonable
evidence to doubt the validity of the null hypothesis;
hence, one concludes there is a statistically significant
difference between the means of the two populations
(i.e., one rejects the null Teresa
hypothesis).
K.
Example
If a random sample of 50 non-smokers have a mean life
of 76 years with a standard deviation of 8 years, and a
random sample of 65 smokers live 68 years with a
standard deviation of 9 years,
Test the hypothesis that there is no difference
between the mean lifetimes of non smokers and
smokers at a 0.01 level of significance.

Teresa K.
Given
Population 1 (non-smokers)
n 1=50 , = 76, S1 = 8,

δ 21 =

= 82/50 =1.28 years


Population 2 (smokers)
n 2= 65 , = 68, S2 = 9,

δ 22 = = 92/65 =1.246 years

δ(n-s) = =

 pooled standard error of the mean


Teresa K.
Hypotheses:
HO: µ1= µ2 or Ho: µ1 - µ2= 0
HA: µ1 ≠ µ2 or HA: µ1 - µ2 ≠ 0
α = 0.01 ( two tailed ) ⇒ Z (tabulated) = ± 2.58
Z calc = { ( - ) - (µ1- µ2) } / Standard error
of the difference of means
Standard error of the difference of means
δ(n-s) = = = 1.59 years
Hence, zcal = (76-68)/1.59 = 5.03
Because Zcalc > Ztab (i.e., P-value < the given α
value), the null hypothesis ( Ho) is rejected. That is,
there is a statistically significant difference in the
mean lifetimes of nonTeresasmkers
K.
and smokers
Hypothesis Testing for Single Population Proportion

For large sample, (np > 5, nq > 5), the test


statistics has approximate standard normally
distribution:
Teresa K.
3. Find the critical value
4. Decision Rule:
Reject the null hypothesis if:

Do not reject the null hypothesis if:

Teresa K.
Example:
• The national institute of mental health published an
article stating that in any one year period,
approximately 9.5 percent of American adults suffer
from depression or a depressive illness. Suppose that
in a survey of 100 people in a certain town, seven of
them suffered from depression or a depressive
illness. Conduct a hypothesis test to determine if the
true proportion of the people in that town suffering
from depression or depressive illness is different
from the percent in the general adult American
population.

Teresa K.
Example:

• Solution: the hypothesis can be stated as:


–Ho: P = 0.0095
–HA: P ≠ 0.095
The level of significance for the test is α = 0.05.
The critical value can be obtained from the normal
distribution at the mentioned level of significance.
Thus, Zα/2 = Z0.025 = ± 1.96.

Teresa K.
Example: cont’d…
• To compute the calculated value of the test statistics,
first we need to calculate sample proportion from
the data. That is p = 7/100= 0.07. from this the
standard error of proportion is defined as:
pq 0.095* 0.905
p = = = 0.0293
n 100
• Then the calculated value of z from the data is given
by:
p -  0.07 - 0.095
z= = -29.08
SE 0.0293
• Decision reject the null hypoyhesis.
Teresa K.
Procedure for one tailed test of proportion
The procedure for the one sided test of proportion is
quit similar with one tailed of population mean. The
only difference is the standard deviation of proportion.

Teresa K.
Teresa K.
Hypothesis testing for two proportions
A similar approach is adopted when performing a
hypothesis test to compare two proportions. The
standard error of the difference in proportions is again
calculated, but because we are evaluating the
probability of the data on the assumption that the null
hypothesis is true we calculate a slightly different
standard error.

Se(p1-p2) =

Which is pooled standard error of the proportions.


Teresa K.
Hypothesis testing for two proportions cont’d…

If the sample size is large and n1p1≥5, n1(1-p1) ≥ 5, n2p2 ≥ 5,


and n2(1-p2) ≥ 5, then:

zcal =

If the sample size is small and n1p1<5, n1(1-p1)<5 , n2p2<5


and n2(1-p2)<5, then use student’s t-statistic at n1+ n2-2
degrees of freedom with the given level of significant.

Teresa K.
Hypothesis testing for two proportions cont’d…

The hypothesis for two proportions


Ho: π1-π2 =0
HA: π1-π2 ≠0
The test statistic is given by

( p 1  p 2 )  ( 1   2 )
z cal 
p 1 (1  p 1 ) p 2 (1  p 2 )

n1 n2

Teresa K.
Example:

A health officer is trying to study the malaria situation of


Ethiopia. From the records of seasonal blood survey (SBS)
results he came to understand that the proportion of
people having malaria in Ethiopia was 3.8% in 1978 (Eth.
Cal). The size of the sample considered was 15000. He
also realized that during the year that followed (1979),
blood samples were taken from 10,000 randomly selected
persons. The result of the 1979 seasonal blood survey
showed that 200 persons were positive for malaria.
Help the health officer in testing the hypothesis that the
malaria situation of 1979 did not show any significant
difference from that of 1978 (take the level of
significance, a =0.01). Teresa K.
solutions

Ho: π1978 = π1979 or π1978-π1979 =0


HA: π1978 ≠ π1979 or π1978-π1979 ≠0
P1978 =0.038, n1978 =15,000
P1979 =0.02, n1979 = 10,000
Ztab (α=0.01, two tailed) = 2.58
Test statistics:

Z cal = =

= Teresa K.
= 0.018/0.0021=8.571
Decision: reject Ho
Because Z calc > Z tab; in other words, the p- value is
less than the level of significance (i.e., α= 0.01)

Teresa K.
One tailed test
Help the health officer in testing the hypothesis that the
malaria prevalence of 1978 was greater than that of
1979 (take the level of significance, a =0.01).
Solution
Ho: π1978 = π1979 or π1978-π1979 =0
HA:π1978 > π1979 or π1979 -π1978 > 0
P1978 =0.038, n1978 =15,000
P1979 =0.02, n1979 = 10,000
Ztab (α=0.01, one tailed) = 2.33

Teresa K.
solutions

Test statistics:

Z cal = =

= = 0.018/0.0021=8.571

Decision: reject Ho
Because Zcalc > Ztab; in other words, the p- value is less
than the level of significance (i.e., α= 0.01)

Teresa K.
Hypothesis testing for means and proportion of small
samples
We have seen in the preceding sections how the
Standard normal distribution can be used to carryout
tests of significance for the means and proportions of
large samples.
In this section we shall see how similar methods may be
used when we have small samples, using the t-
distribution.

Teresa K.
Tests of Hypothesis using the t - distribution

Tests of hypotheses about the mean are carried out with


the t distribution just as for the normal distribution,
except that we must consider the number of degrees of
freedom and use a different table (the table of t
distribution).
Example:
The mean pulse rate and standard deviation of a random
sample of 9 first year male medical students were 68.7
and 8.67 beats per minute respectively. (Assume normal
distribution).

Teresa K.
Tests of Hypothesis using the t - distribution cont’d…
If past experience indicates that the mean pulse rate of
first year male medical students is 72 beats per minute,
test the hypothesis that the above sample estimate is
consistent with the population mean at 5% level of
significance.
Solution:
Hypotheses :
Ho: µo = 72
HA: µ ≠ 72
tcal = = = -3.3/2.89 = -1.14

Teresa K.
Tests of Hypothesis using the t - distribution cont’d…

This corresponds to a P-value of greater than 0.10


ttab ( with α = 0.05 and 8 df) = ± 2.31
 Rule: Reject HO
when t-calculated is either greater than 2.31 or less
than –2.31. (in other words, when the p-value is less
than the α - value)
Therefore, the above null hypothesis is accepted.
Conclusion: The result (sample estimate) obtained
from the sample is consistent with the population
mean. That is, the mean pulse rate of the randomly
selected male medical students did not show any
significant difference from the total mean pulse rate
of male medical students at 5% level of significance.
Teresa K.
P-value
Is the probability of getting the observed difference, or
more extreme, in the sample purely by chance from a
population where the true difference is zero.
If the P-value is greater than α (like 0.05) then, by
convention, we conclude that the observed difference
could have occurred by chance and there is no
statistically significant evidence (at the α (like 5%) level
of significance) for a difference between the groups in
the population.

Teresa K.
So , with large p-value, we can not ignore the effect
of chance.
If the p-value < α (like 0.05), then we say the
difference is significant and hence reject the null
hypothesis of no difference.
While if p-value > α (like 0.05), then the difference is
not significant and hence do not reject the null
hypothesis.

Teresa K.
The p-value for test is:
 x  0 
p  value  1   
 / n 

N (0 , 2 / n) N (1, 2 / n)
Under H0 Under H1

Rejection region

μ0 μ1

Teresa K.
Teresa K.
Teresa K.
Example
Certain brand of cigarettes is advertised by manufacturer
as having mean nicotine content of 15 mg/cigarette. A
sample of 200 cigarettes is tested by lab and found to
have average of 15.76mg of nicotine with known SD = 3.6.
Using a 0.01 level of significance, can we conclude that
actual mean nicotine content of this brand is greater than
15 mg?(use p-value to test)

Solution:
Following the steps of hypothesis testing, the first step is
stating the null and alternative hypothesis, but before
that let us see the observed difference using the normal
curve:
Teresa K.
Is 15.76 far enough to right
of μ=15 to be in the critical
area (rejection region)?

  15

Teresa K.
Ho: π=15;
HA: π > 15

Zcal = = =0.76/ 0.255 = 2.98

Ztab(α = 0.01) = 2.33

Zcal (2.98) > Ztab(α = 0.01)(2.33) conclude at 1% level


that mean nicotine level in this brand is greater than 15.

Moreover, the p-value for the test can be computed


using the formula as:
P-value=1-Ø(2.98) = 1- 0.9986
= 0.0014
Teresa K.
Confidence Interval vs. p-value

Confidence Interval
1. Provide information that p-value gives.
– If null value is included in a 95% confidence interval,
by definition the corresponding P-value is >0.05.

2. Indicate the amount of variability (effect of sample size)


by the width of the confidence interval.
– This information can not be obtained from p-value.

Teresa K.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy