Chapter 8-Statistical Inference - Updated 27 December 2022 GC
Chapter 8-Statistical Inference - Updated 27 December 2022 GC
Chapter Eight
8. Estimation and Hypothesis Testing
Inference is the process of making interpretations or conclusions from sample data for the
totality of the population. It is only the sample data that is ready for inference. In statistics
there are two ways though which inference can be made.
Statistical estimation
Statistical hypothesis testing.
Statistical Estimation
This is one way of making inference about the population parameter where the investigator does
not have any prior notion about values or characteristics of the population parameter. There are
two ways estimation.
1) Point Estimation: - It is a procedure that results in a single value as an estimate for a parameter.
2) Interval estimation: - It is the procedure that results in the interval of values as an estimate for a
parameter, which is interval that contains the likely values of a parameter. It deals with identifying
the upper and lower limits of a parameter. The limits by themselves are random variable.
Definitions
1. Confidence Interval: An interval estimate with a specific level of confidence
2. Confidence Level: The percent of the time the true value will lie in the interval estimate given.
3. Consistent Estimator: An estimator which gets closer to the value of the parameter as the sample
size increases.
4. Degrees of Freedom: The number of data values which are allowed to vary once a statistic has
been determined.
5. Estimator: A sample statistic which is used to estimate a population parameter. It must be
unbiased, consistent, and relatively efficient.
6. Estimate: Is the different possible values which an estimator can assumes.
7. Interval Estimate: A range of values used to estimate a parameter.
8. Point Estimate: A single value used to estimate a parameter.
9. Relatively Efficient Estimator: The estimator for a parameter with the smallest variance.
10. Unbiased Estimator: An estimator whose expected value is the value of the parameter being estimated.
Parameter (population values) Estimator (statistic)
n
x i
Population Mean, x i 1
n
x x
2
i
Population variance, 2 s2
n 1
n
x x
2
i
Population S.D, s i 1
n 1
x
Population proportion, p pˆ
n
Population parameters can have more than one estimator, but one best estimator.
Point and Interval estimation of the Population Mean ( µ)
(i) Point Estimation
Another term for statistic is point estimate, since we are estimating the parameter value. A point
estimator is the mathematical way we compute the point estimate. For instance, sum of xi over
n is the point estimator used to compute the estimate of the population means, .That is
x
Mean,
i
x i 1
n
x x
2
i
Variance, 2 s2
n 1
Standard deviation, s s2
x
Proportion, p pˆ
n
(ii) Confidence Interval estimation of the Population Mean
Although X possesses nearly all the qualities of a good estimator, because of sampling error, we
know that it's not likely that our sample statistic will be equal to the population parameter, but
instead will fall into an interval of values. We will have to be satisfied knowing that the statistic
is "close to" the parameter. That leads to the obvious question, what is "close"?
We can phrase the latter question differently: How confident can we be that the value of the statistic
falls within a certain "distance" of the parameter? Or, what is the probability that the parameter's
value is within a certain range of the statistic's value? This range is the confidence interval.
The confidence level is the probability that the value of the parameter falls within the range
specified by the confidence interval surrounding the statistic. There are different cases to be
considered to construct confidence intervals.
Case-1: If sample size is large or if the population is normal with known variance
Recall the Central Limit Theorem, which applies to the sampling distribution of the mean of a
sample. Consider samples of size n drawn from a population, whose mean is and standard
deviation is with replacement and order important. The population can have any frequency
X
Z has a normal distribution with mean 0 and var iance 1
n
X Z n
X , where is a measure of error.
Z n
For the interval estimator to be good the error should be small. How it be small?
By making n large Small variability Taking Z-small
To obtain the value of Z, we have to attach this to a theory of chance. That is, there is an area of
size 1 such.
P ( Z 2 Z Z 2 ) 1
Where is the probability that the parameterlies outsidethe int erval
Z 2 s tan ds for the s tan dard normal var iableto the right of which
2 probability lies, i.e P(Z Z 2 ) 2
X
P( Z Z 2 ) 1
n
2
P( X Z 2 n X Z 2 n) 1
( X Z 2 n, X Z 2 n ) is a1001 % conifidence int erval for
Case-2: If population is normal or approximately normal, the sample size is large and the
variance is unknown
Usually
2
is not known, in that case we estimate by its point estimator S2
( X Z 2 S n , X Z 2 S n ) is a1001 % conifidence int erval for
Here are the Z-values corresponding to the most commonly used confidence levels.
100(1 ) % 2 Z 2
90 0.10 0.05 1.645
95 0.05 0.025 1.96
99 0.01 0.005 2.58
Case-3: If population is normal or approximately normal, sample size is small and the
population variance, 2 is not known we will use t-distribution.
The t distribution was developed by W. S. Gosset in 1908 and published under the Pseudonym
Student. As a result, the t distribution is also called Student’s t distribution. The t distribution is
similar to the normal distribution in some respects. Like the normal distribution curve, the t
distribution curve is symmetric (bell-shaped) about the mean and it never meets the horizontal
axis. The total area under a t distribution curve is 1.0 or 100%. However, the t distribution
curve is flatter than the standard normal distribution curve. In other words, the t distribution
curve has a lower height and a wider spread (or, we can say, larger standard deviation) than the
standard normal distribution.
However, as the sample size increases, the t distribution approaches the standard normal
distribution. The units of a t distribution are denoted by t .The shape of a particular t
distribution curve depends on the number of degrees of freedom (df).
Z-distribution
t -distribution
=0
Characteristics of the t Distribution
The t distribution shares some characteristics of the standard normal distribution and differs from
it in others. The t distribution is similar to the standard normal distribution in these ways:
1. It is bell-shaped.
2. It is symmetric about the mean.
3. The mean, median, and mode are equal to 0 and are located at the center of the distribution.
4. The curve approaches but never touches the x axis.
The t distribution differs from the standard normal distribution in the following ways:
1. The t distribution is actually a family of curves based on the concept of degrees of freedom,
which is related to sample size.
2. The standard deviation of a t distribution is df /(df 2) which always greater than 1 is.
Thus its variance is also greater than 1.
3. As the sample size increases, the t distribution approaches the standard normal distribution.
To find the 100(1- )% CI for the population mean ( ) will be:
X
t has t distribution with (n 1) deg rees of freedom.
S n
( X t 2 S n , X t 2 S n ) is a1001 % conifidenc e int erval for
The unit of measurement of the confidence interval is the standard error. This is just the standard
deviation of the sampling distribution of the statistic.
Examples: From a normal sample of size 25 a mean of 32 was found. Given that the population
standard deviation is 4.2. Find
a) A 95% confidence interval for the population mean.
b) A 99% confidence interval for the population mean.
Solution:
X 32, 4.2, 1 0.95 0.05, 2 0.025
Z 2 1.96 from table.
a) The required int erval will be X Z 2 n
32 1.96 * 4.2 25
32 1.65
(30.35, 33.65)
b)
Example: - A doctor wanted to estimate the mean cholesterol level for all adult men living in
Adama City. He took a sample of 25 adult men from the city and found that the mean cholesterol
level for this sample is 186 mg/dL with a standard deviation of 12 mg/dL. Assume that the
cholesterol levels for all adult men in Adama City are (approximately) normally distributed.
Construct a 95% confidence interval for the population mean .
Solution Given: n 25, x 186 mg / dL and s 12 mg / dL.
Since the population is normally distributed, is not known and n < 30, we have to use the
t -distribution with n-1=25-1=24 degrees of freedom.
1 100% 95%
0.05
t n 1 t0.025 24 2.064 from table
2
Note that x 186 is a point estimate of in this example, and 4.95 is the margin of error.
Example: - Sixty-four randomly selected adults who buy books for general reading were asked
how much they usually spend on books per year. The sample produced a mean of 1450 Birr and
a standard deviation of 300 Brr for such annual expenses. Determine a 99% confidence interval
for the corresponding population mean.
Solution: - From the given information,
n=64 (large sample size), x 1450 Birr , s=300 Birr ( unknown) and confidence level=0.99
Hence, we will use the t distribution with 63 df to make a confidence interval for .
A 99 percent confidence interval of will be:
s s
x t ( n 1)
x t 0.005( 63)
2 n n
300
1450 ( 2.656)
64
1450 99.6
(1350.4 Birr ,1549.6 Birr ).
small, then we may fail to achieve the objective of our analysis and if it is too large, then we
waste the resources when we gather the sample.
1. When we estimate the population mean by the sample mean x ,with probability 1
z
2 2
z s
the sample size is at least: n 2 if is known or n 2 if not known.
E E
When we compute n-using the above relation, we may get a fractional number. In such
cases we always round up the fractional number to the next integer.
Example: - A scientist wishes to estimate the average depth of a river. He wants to be 99%
confident that the estimate is accurate within 2 feet. From a previous study, the standard
deviation of the depths measured was 4.33 feet. Find the sample size.
Solution
Since 0.01(or 1 0.99), z 2.58 and E 2. Substituting in the formula,
2
z
2
(2.58)(4.33 2
n 2 31.2
E 4.33
n=32 (Round the value up to 32). Therefore, to be 99% confident that the estimate is within 2
feet of the true mean depth, the scientist needs a sample of at least 32 measurements.
In most cases in statistics, we round off. However, when determining sample size, we always
round up to the next whole number.
Hypothesis Testing
This is also one way of making inference about population parameter, where the investigator has
prior notion about the value of the parameter.
Introduction
Researchers are interested in answering many types of questions. For example, a scientist might
want to know whether there is evidence of global warming. A physician might want to know
whether a new medication will lower a person’s blood pressure. An educator might wish to see
whether a new teaching technique is better than a traditional one. A retail merchant might want
to know whether the public prefers a certain color in a new line of fashion. Automobile
manufacturers are interested in determining whether a new type of seat belt will reduce the
severity of injuries caused by accidents. These types of questions can be addressed through
statistical hypothesis testing, which is a decision-making process for evaluating claims about a
population. In hypothesis testing, the researcher must define the population under study, state the
particular hypotheses that will be investigated, give the significance level, select a sample from
the population, collect the data, perform the calculations required for the statistical test, and
reach a conclusion.
Hypotheses concerning parameters such as means and proportions can be investigated.
There are two specific statistical tests used for hypotheses concerning means: the z test and the t
test. This chapter will explain in detail the hypothesis-testing procedure along with the z test and
the t test.
The three methods used to test hypotheses are
1. The Critical Value Method (The Traditional Approach)
2. The P-value Method (The Modern Approach)
3. The Confidence Interval Method
The traditional method will be explained first. It has been used since the hypothesis testing
method was formulated. A newer method, called the P-value method, has become popular with
the advent of modern computers and high-powered statistical calculators.
Hypothesis and type of hypotheses
A claim (or statement) about a population parameter is called a hypothesis.
Definitions:
Statistical hypothesis: is an assertion or statement about the population whose plausibility is to
be evaluated on the basis of the sample data.
Test statistic: is a statistics whose value serves to determine whether to reject or accept the
hypothesis to be tested. It is a random variable.
Statistic test: is a test or procedure used to evaluate a statistical hypothesis and its value depends
on sample data.
There are two types of hypothesis:
Null hypothesis: - It is the hypothesis to be tested. Null hypothesis is also known as the
hypothesis of equality or the hypothesis of no difference. It is usually denoted by H0.
Alternative hypothesis: - It is the hypothesis available when the null hypothesis has to be
rejected. It is the hypothesis of difference. It is usually denoted by H1 or Ha.
Types and size of errors: - Testing hypothesis is based on sample data which may involve
sampling and non-sampling errors.
The following table gives a summary of possible results of any hypothesis test:
Decision
Reject H0 Don't reject H0
Truth H0 Type I Error Right Decision
H1 Right Decision Type II Error
- Type I error: Rejecting the null hypothesis when it is true.
- Type II error: Failing to reject the null hypothesis when it is false.
Note:
1. There are errors that are prevalent in any two choice decision making problems.
2. There is always a possibility of committing one or the other errors.
3. Type I error ( ) and type II error ( ) have inverse relationship and therefore, cannot be
minimized at the same time.
In practice we set at some value and design a test that minimize . This is because a type I
error is often considered to be more serious, and therefore more important to avoid, than a type II
error.
General steps in hypothesis testing:
Step-1: Specify the null hypothesis (H0) and the alternative hypothesis (H1).
Step-2: Select a significance level,
Step-3: Identify the sampling distribution of the estimator.
Step-4: Calculate a test statistic and critical value (tabulated value) analogous to the
parameter specified by the null hypothesis.
Step-5: Identify the critical region/tabulated value.
Step-6: Making a decision.
Step-7: Give a conclusion.
Hypothesis testing about the population mean, :
Suppose the assumed or hypothesized value of is denoted by 0 , then one can formulate two sided
(1) and one sided (2) and (3) hypothesis as follows:
1. H 0 : 0 vs H1 : 0
2. H 0 : 0 vs H1 : 0
3. H 0 : 0 vs H1 : 0
Case -1: When sampling is from a normal distribution with
2
known
After specifying we have the following regions (critical and acceptance) on the standard normal
distribution corresponding to the above three hypothesis.
Summary table for decision rule
H0 Reject H0 if Accept H0 if Inconclusive if
0 Z cal Z 2 Z cal Z 2 Z cal Z 2 or Z cal Z 2
0 Z cal Z Z cal Z Z cal Z
0 Z cal Z Z cal Z Z cal Z
Where: Z X 0
cal
n
Case-2: When sampling is from a normal distribution with 2 unknown and small sample size
X
The relevant test statistic is t ~ t with n 1 deg rees of freedom. After
S n
specifying we have the following regions on the student t-distribution corresponding to the above
three hypothesis.
H0 Reject H0 if Accept H0 if Inconclusive if
0 tcal t 2 tcal t 2 tcal t 2 or tcal t 2
0 tcal t tcal t tcal t
0 tcal t tcal t tcal t
X 0
Where, t cal
S n
Case-3: When sampling is from a non- normally distributed population or a population whose
functional form is unknown.
If a sample size is large one can perform a test hypothesis about the mean by using:
X 0
Z cal , if 2 is known.
n
X 0
, if 2 is unknown.
S n
The decision rule is the same as case I.
Example1: Test the hypotheses that the average height content of containers of certain lubricant is
10 liters if the contents of a random sample of 10 containers are 10.2, 9.7, 10.1, 10.3, 10.1, 9.8,
9.9, 10.4, 10.3, and 9.8 liters. Use the 0.01 level of significance and assume that the distribution of
contents is normal.
Solution:
At 5% level of significance, we have no evidence to say that that the life time of light bulbs is
decreasing, based on the given sample data.
Exercise-1: It is known in a pharmacological experiment that rats fed with a particular diet over a
certain period gain an average of 40 gms in weight. A new diet was tried on a sample of 20 rats
yielding a weight gain of 43 gms with variance 7 gms2. Test the hypothesis that the new diet is an
improvement assuming normality.
a) State the appropriate hypothesis
b) What is the appropriate test statistic? Why?
c) Identify the critical region(s)
d) On the basis of the given information test the hypothesis and make conclusion.
Exercise-2: State the null and alternative hypotheses for each conjecture.
a. A researcher thinks that if expectant mothers use vitamin pills, the birth weight of the
babies will increase. The average birth weight of the population is 8.6 pounds.
b. An engineer hypothesizes that the mean number of defects can be decreased in a
manufacturing process of USB drives by using robots instead of humans for certain tasks.
The mean number of defective drives per 1000 is 18.
c. A psychologist feels that playing soft music during a test will change the results of the
test. The psychologist is not sure whether the grades will be higher or lower. In the past,
the mean of the scores was 73.
Example: - A producer of an electric bulbs claims that the average life length of its product is
1800 hrs. A sample of 400 bulbs gave mean life length of 1780 hrs. Suppose it’s known that life
lengths are normally distributed with standard deviation of 200 hrs.
(a) Would you support the producers claim at 5% level of significance?
(b) Test also that the average life length of the bulbs is less than the producer’s claims at 1%
level of significance.
Solution for (a):-
Step 1: H o : o 1800
H A : o 1800
Step 2: 5% 0.05
Step 3: Population is normal, 200 known , n 400
x 0
zcal
n
Step 4: The critical region is
x 0
z
2
n
But x 1780, 200, n 400 and 0 1800.
1780 1800
Then zcal 2 2.
200
400
Conclusion: At 1% level of significance we have enough evidence to support the claim that the
average life length of its product is less than 1800 hrs.
Example: - A random sample of 100 recorded deaths in the United States during the past year
showed an average life span of 71.8 years. Assuming a population standard deviation of 8.9
years, does this seem to indicate that the mean life span today is greater than 70 years? Use a
0.05 level of significance.
Given: 0 70 years , 8.9 years , x 71.8 , n 100 .
Solution:-
Step 1 H 0 : 70 years
H a : 70 yers
Step 2: 0.05
Step 3: The test statistic is:
x 0 71.8 70
z zcal 2.02.
8.9
n 100
x 0
Step 4: The critical region is z
n
zcal 2.02 , ztab 1.64 .
Step 5: Since 2.02 > 1.64.
Conclusion: At 5% level of significance we have enough evidence to support the claim that that
the mean life span today is greater than 70 years.
Exercise:-A company has a computer system that can process at most 1200 bills per hour. A
new system is tested which processes an average of 1260 bills per hour with a standard deviation
of 215 bills in a sample of 40 hours. Test if the new system is significantly better than old one at
the 5% level of significance.
Exercise:- The Edison Electric Institute has published figures on the number of kilowatt hours
used annually by various home appliances. It is claimed that a vacuum cleaner uses an average of
46 kilowatt hours per year. If a random sample of 12 homes included in a planned study indicates
that vacuum cleaners use an average of 42 kilowatt hours per year with a standard deviation of
11.9 kilowatt hours, does this suggest at the 0.05 level of significance that vacuum cleaners use,
on average, less than 46 kilowatt hours annually? Assume the population of kilowatt hours to be
normal.
Z 0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
0.0 0.0000 0.0040 0.0080 0.0120 0.0160 0.0199 0.0239 0.0279 0.0319 0.0359
0.1 0.0398 0.0438 0.0478 0.0517 0.0557 0.0596 0.0636 0.0675 0.0714 0.0753
0.2 0.0793 0.0832 0.0871 0.0910 0.0948 0.0987 0.1026 0.1064 0.1103 0.1141
0.3 0.1179 0.1217 0.1255 0.1293 0.1331 0.1368 0.1406 0.1443 0.1480 0.1517
0.4 0.1554 0.1591 0.1628 0.1664 0.1700 0.1736 0.1772 0.1808 0.1844 0.1879
0.5 0.1915 0.1950 0.1985 0.2019 0.2054 0.2088 0.2123 0.2157 0.2190 0.2224
0.6 0.2257 0.2291 0.2324 0.2357 0.2389 0.2422 0.2454 0.2486 0.2517 0.2549
0.7 0.2580 0.2611 0.2642 0.2673 0.2704 0.2734 0.2764 0.2794 0.2823 0.2852
0.8 0.2881 0.2910 0.2939 0.2967 0.2995 0.3023 0.3051 0.3078 0.3106 0.3133
0.9 0.3159 0.3186 0.3212 0.3238 0.3264 0.3289 0.3315 0.3340 0.3365 0.3389
1.0 0.3413 0.3438 0.3461 0.3485 0.3508 0.3531 0.3554 0.3577 0.3599 0.3621
1.1 0.3643 0.3665 0.3686 0.3708 0.3729 0.3749 0.3770 0.3790 0.3810 0.3830
1.2 0.3849 0.3869 0.3888 0.3907 0.3925 0.3944 0.3962 0.3980 0.3997 0.4015
1.3 0.4032 0.4049 0.4066 0.4082 0.4099 0.4115 0.4131 0.4147 0.4162 0.4177
1.4 0.4192 0.4207 0.4222 0.4236 0.4251 0.4265 0.4279 0.4292 0.4306 0.4319
1.5 0.4332 0.4345 0.4357 0.4370 0.4382 0.4394 0.4406 0.4418 0.4429 0.4441
1.6 0.4452 0.4463 0.4474 0.4484 0.4495 0.4505 0.4515 0.4525 0.4535 0.4545
1.7 0.4554 0.4564 0.4573 0.4582 0.4591 0.4599 0.4608 0.4616 0.4625 0.4633
1.8 0.4641 0.4649 0.4656 0.4664 0.4671 0.4678 0.4686 0.4693 0.4699 0.4706
1.9 0.4713 0.4719 0.4726 0.4732 0.4738 0.4744 0.4750 0.4756 0.4761 0.4767
2.0 0.4772 0.4778 0.4783 0.4788 0.4793 0.4798 0.4803 0.4808 0.4812 0.4817
2.1 0.4821 0.4826 0.4830 0.4834 0.4838 0.4842 0.4846 0.4850 0.4854 0.4857
2.2 0.4861 0.4864 0.4868 0.4871 0.4875 0.4878 0.4881 0.4884 0.4887 0.4890
2.3 0.4893 0.4896 0.4898 0.4901 0.4904 0.4906 0.4909 0.4911 0.4913 0.4916
2.4 0.4918 0.4920 0.4922 0.4925 0.4927 0.4929 0.4931 0.4932 0.4934 0.4936
2.5 0.4938 0.4940 0.4941 0.4943 0.4945 0.4946 0.4948 0.4949 0.4951 0.4952
2.6 0.4953 0.4955 0.4956 0.4957 0.4959 0.4960 0.4961 0.4962 0.4963 0.4964
2.7 0.4965 0.4966 0.4967 0.4968 0.4969 0.4970 0.4971 0.4972 0.4973 0.4974
2.8 0.4974 0.4975 0.4976 0.4977 0.4977 0.4978 0.4979 0.4979 0.4980 0.4981
2.9 0.4981 0.4982 0.4982 0.4983 0.4984 0.4984 0.4985 0.4985 0.4986 0.4986
3.0 0.4987 0.4987 0.4987 0.4988 0.4988 0.4989 0.4989 0.4989 0.4990 0.4990
t table with right tail probabilities