0% found this document useful (0 votes)
21 views45 pages

Chapter 3

Chapter 3 discusses hypothesis testing, outlining the process of formulating null and alternative hypotheses, determining test statistics, and making conclusions based on sample data. It emphasizes the importance of the null hypothesis and the potential for Type I and Type II errors in statistical testing. Various examples illustrate the application of these concepts in real-world scenarios.

Uploaded by

Nuyara Vithanage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views45 pages

Chapter 3

Chapter 3 discusses hypothesis testing, outlining the process of formulating null and alternative hypotheses, determining test statistics, and making conclusions based on sample data. It emphasizes the importance of the null hypothesis and the potential for Type I and Type II errors in statistical testing. Various examples illustrate the application of these concepts in real-world scenarios.

Uploaded by

Nuyara Vithanage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 45

CHAPTER 3

HYPOTHESIS TESTS
Statistical Hypotheses

Statistical hypothesis: a claim about the value of a parameter or population


characteristic.

Examples:
• cents, where is the true population average of daily per-student candy ,soda expenses in US
high schools
• where is the population proportion of defective helmets for a given manufacturer
• If denote the true average breaking strengths of two different types of twine, one
hypothesis might be the assertion that , or another is the statement 5
Components of a Hypothesis Test
1. Formulate the hypothesis to be tested.
2. Determine the appropriate test statistic and calculate it using the sample data.
3. Comparison of test statistic to critical region to draw initial conclusions.
4. Calculation of p-value.
5. Conclusion, written in terms of the original problem.
1. Formulate the hypothesis to be tested.

Null vs Alternative Hypotheses


In any hypothesis-testing problem, there are always two competing hypotheses under
consideration:
2. The null hypothesis
3. The alternative hypothesis

The objective of hypothesis testing is to decide, based on sample information, if the


alternative hypotheses is actually supported by the data.

We usually do new research to challenge the existing (accepted) beliefs.


Null vs Alternative Hypotheses
Is there strong evidence for the alternative? The burden of proof is placed on those who
believe in the alternative claim.
This initially favored claim will not be rejected in favor of the alternative claim unless
the sample evidence provides significant support for the alternative assertion.
If the sample does not strongly contradict , we will continue to believe in the plausibility
of the null hypothesis.
The two possible conclusions: 1) Reject .
2) Fail to reject .
Why be so committed to the null hypothesis?
• Sometimes we do not want to accept a particular assertion unless (or until) data can show
strong support
• Reluctance (cost, time) to change

Example : Suppose a company is considering putting a new type of coating on bearings that
it produces.
The true average wear life with the current coating is known to be 1000 hours. With
denoting the true average life for the new coating, the company would not want to make any
(costly) changes unless evidence strongly suggested that exceeds 1000
An appropriate problem formulation would involve testing
against
The conclusion that a change is justified is identified with , and it would take conclusive
evidence to justify rejecting and switching to the new coating. Scientific research often
involves trying to decide whether a current theory should be replaced, or “elaborated
upon.”
The alternative to the null hypothesis will look like one of the following three assertions:

1. (in which case the null hypothesis is )


2. (in which case the null hypothesis is )

• The equality sign is always with the null hypothesis.


• The alternate hypothesis is the claim for which we are seeking statistical proof.
Example 3.1: For the claims in part (a) – (f), (i) find H0 and H1, (ii) give the type of critical
region (right-tailed, left-tailed, or two tailed).
(a) The mean temperature in a coastal town is less than 78F.
(b) The mean grade point average of graduating seniors at a university is at least 2.3.
(c) The mean income for L.A. Mission faculty is $4500 per month.
(d) The proportion of voters in a state who favor the death penalty under prescribed
conditions is 0.53.
(e) The proportion of full-time college students younger than 26 years of age is at most .90.
(f) The proportion of high school graduates in 1990 seeking full-time employment was more
than .30.
2. Determine the appropriate test statistic and calculate it using the sample data.
Test Statistics
A test statistic is a rule, based on sample data, for deciding whether to reject .
The test statistic is a function of the sample data that will be used to make a decision about
whether the null hypothesis should be rejected or not.
Example: Company A produces circuit boards, but 10% of them are defective. Company B
claims that they produce fewer defective circuit boards.

Our data is a random sample of boards from company B.


What test procedure (or rule) could we devise to decide if the null hypothesis should be
rejected?
Test la:
Test Statistic
• The z test is a statistical test for the mean of a population. It can be used when , or when the
population is normally distributed and is known.
• Many hypotheses are tested using a statistical test based on the general formula The z Test
The formula for the z test is:

Where

-hypothesized
population mean
Example 3.2
Each year trainees throughout the country sit a test. Over a period of time it has been
established that the marks can be modelled by a normal distribution with mean 70 and
standard deviation 6.
This year it was thought that trainees from a particular county did not perform as well as
expected. The marks of a random sample of 25 trainees from the county were scrutinised
and it was found that their mean mark was 67.3.
Does this provide evidence, at the 5% significance level, that trainees from this county did
not perform well as expected?
Example 3.3
A sample of size 16 is taken from the distribution of and a hypothesis test is carried out at
the level of significance. On the basis of the value of the sample mean , the null hypothesis
is rejected in favour of the alternative hypothesis . What can be said about the value of ?
Test lb:
Since the population is not normal, you cannot say that the distribution of X is normal for all
sample sizes. If the sample size is large, however, you can apply the central limit theorem.
This states that for large samples taken from a non-normal population, the sampling
distribution of means is approximately normal, whatever the distribution of the parent
population.
The test statistic is , where
Example 3.3
The management of a large hospital states that the mean age of its patients is 45 years.
Records of a random sample of 100 patients give a mean age of 48.4 years. Using a
population standard deviation of 18 years, test at the 5% significance level whether there is
evidence that the management's statement is incorrect. State clearly your null and alternative
hypotheses.
Test lc:
Testing the mean , of a population X where the variance is unknown and the sample size
is large
When calculating confidence intervals it is often the case that the population variance, , is
not known. Provided that the sample size, is large, ( say) it is permissible to use .
Where , is the sample variance.
Or
Ideally the population distribution should be normal, but if it is not, then the central limit
theorem can be applied, since the sample size is large.
The test statistic is , where
Example 3.4
The packaging on an electric light bulb states that the average length of life of bulbs is 1000
hours. A consumer association thinks that this is an over estimate and tests a random sample
of 64 bulbs, recording the life x hours, of each bulb. The results are summarised as follows:
(a) Calculate the sample mean,
(b) Calculate an unbiased estimate for the standard deviation of the length of life of all light
bulbs of this type.
(c) Is there evidence, at the 10% significance level, that the statement on the packaging is
over estimating the length of life of this type of light bulb?
2. Errors in Hypothesis Testing
Definition
• A type I error is when the null hypothesis is rejected, but it is true.
• A type II error is not rejecting when is false.
A Type I error is made if is rejected when is true.
This is written
is rejected| is true)

If the significance level is then the probability of rejecting is .

A Type II error is made if is accepted when is false. This is written

is accepted| is False)

To calculate the probability of a Type II error, a particular value must be specified in the
alternative hypothesis .
Power of a Test=P(reject when is true)
=

Example 3.5
A random variable has a normal distribution with mean and standard deviation 3. The null
hypothesis is to be tested against the alternative hypothesis using a random sample of size 25.
It is detected that the null hypothesis will be rejected if the sample mean greater than 21.4.
(a) Calculate the probability of making a Type I error.
(b) Calculate the probability of making a Type II error, when in fact .
Test ld:
Testing the mean . when the population X is normal but the variance is unknown and the
sample size is small In this case, the population is normal, so Since is unknown, is used
instead (as in Test 1c). Consider the distribution of the sample mean . When the sample
size is small, does not follow a normal distribution. The standardised statistic is called
and it follows a t-distribution with (n - 1) degrees of freedom.
The test statistic and
Example 3.6
Five readings of the resistance X, in ohms, of a piece of wire gave the following results:
1.51, 1.49, 1.54, 1.52, 1.54
These are summarised by .
If the wire is pure, the resistance is 1.50 ohms. If the wire is impure, its resistance is higher
than 1.50 ohms. Assuming that the resistance can be modelled by a normal variable with
1nean ., and standard deviation , calculate
(a) the sample mean, x,
(b) an unbiased estimate of ,
(c) Is there evidence, at the 5% level of significance, that the wire is impure?
Hypothesis Test 3: Testing ,, The Difference Between Means Of Two Normal
Populations
This test is used when you have two normal populations with unknown means, , and you
want to test the difference between the means of these populations. Consider .
The hypotheses might be:
Test 3a: The population variances and are known

If the variances and are known,


The test statistic is where
In standardized form,
The test statistic is , where .
Note that the 95% confidence limits for are
Test 3b: The populations have a common variance, which is known

The test statistic is where


In standardized form,
The test statistic is , where .
Note that the 95% confidence limits for are
Test 3c: The populations have a common variance, which is unknown

If the common population variance is unknown, then an unbiased estimate is used


instead. This is sometimes known a pooled two- sample estimate, where,

The distribution of depends on the samples taken are large or small.


Example 3.7
Due to differences in the environment the masses of a certain species of small animal are
believed to be greater in region A than in Region B. It is known that the masses in both
regions are normally distributed, with masses in Region A having a standard deviation 0.04
kg and masses in region B having a standard deviation of 0.09 g.
To test the theory, random samples are taken: 60 animals from Region A had a mean mass of
3.03 kg and 50 animals from Region B had a mean mass of 3.00 kg.
Does this provide evidence, at the 1% level that the animals of this species in Region A have
a greater mass than those in Region B?
Example 3.8
The same physical fitness test was given to a group of 100 scouts and to a group of 144
guides. The maximum score was 30. The guides obtained a mean score of 26.81 and the
scouts obtained a mean score of 27.53. Assuming that the fitness scores are normally
distributed with a common population standard deviation of 3.48, test at the 5% level of
significance whether the guides did not do as well as the scouts in the fitness test .
Hypothesis Test 2: Testing a Binomial Proportion When is Large
When testing the proportion , of a binomial population, the test statistic is , number of
successes in a trial, where .
When n is large such that is approximately normal and .
In standardized form,
The test statistic is , where
Example 3.9
Caroline was asked to test whether a coin is biased in favour of heads, using a 5% level of
significance. She tossed the coin 100 times and obtained 57 heads. What should she have
concluded?
Example 3.10
The random variable can be modelled by a binomial distribution with parameters and
whose value is unknown. A significance test is performed to test sample value x, to test null-
hypothesis against the alternative hypothesis . The probability of making type I error is 0.05.
(a) Find the critical region for .
(b) Find the probability of making a Type II error in the case when P = 0.3.

You might also like