0% found this document useful (0 votes)
15 views31 pages

M2 Lec 9 Stats Sp2024 Mon

This document covers inference for proportions, including hypothesis testing and confidence intervals. It discusses 1-proportion and 2-proportions tests using both exact and normal approximation approaches. Examples are provided to demonstrate hypothesis testing for 1 and 2 proportions, as well as constructing confidence intervals and determining required sample sizes.

Uploaded by

katethekat2.0
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)
15 views31 pages

M2 Lec 9 Stats Sp2024 Mon

This document covers inference for proportions, including hypothesis testing and confidence intervals. It discusses 1-proportion and 2-proportions tests using both exact and normal approximation approaches. Examples are provided to demonstrate hypothesis testing for 1 and 2 proportions, as well as constructing confidence intervals and determining required sample sizes.

Uploaded by

katethekat2.0
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/ 31

Mathematics 2

Lecture 9: Inference for Proportions

Danica Solina
School of Mathematical & Physical Sciences

Math2: Statistics - Lecture 9 - 1


Inference for Proportions

• Reference: Devore § 7.2, 8.3, 8.4, and 9.4

• In this case, we are looking at the proportion of cases in a population that fall
in a particular category
• E.g. defective item, passed a test, flip a head, or vote for a particular candidate in an
election.

• Proportion of population in this category of interest is denoted by p


• Note the departure from the regular Greek notation.

Math2: Statistics - Lecture 9 - 2


1-Proportions Test

• We use the sample proportion ( ) to estimate p.

X number of successes
pˆ = =
n sample size

where X is the number of successes in a sample of size n.

Math2: Statistics - Lecture 9 - 3


1-Proportions Test

There are two approaches that we can take to perform hypothesis tests on
proportions:
• Calculate the p-value exactly

• Use the Normal approximation to the Binomial distribution


• If X ~ Bin (n,p), we can approximate X by
Y ~ N(µ = np, σ² = np(1-p)) when np ≥ 10 and n(1-p) ≥ 10.
• Then we can perform a 1-sample Z test on Y.

Math2: Statistics - Lecture 9 - 4


1-Proportions Test – Exact Approach

Recall that the p-value is the probability that we obtain the observed result or
one that is more extreme if the null hypothesis is true.

• If H1: p ≠ p0 then p-value = P(|X – np0| > |Xobs – np0|)


• If H1: p > p0 then p-value = P(X > Xobs)
• If H1: p < p0 then p-value = P(X < Xobs)

where X ~ Bin (n,p0)

Math2: Statistics - Lecture 9 - 5


1-Proportions Test – Approximate Approach

• Let X be the number of observations in a random sample of size n that


belongs to the category associated with p. Then

is approximately a standard normal random variable, i.e. N(0,1)

Math2: Statistics - Lecture 9 - 6


1-Proportions Test

Rejection Regions
a) H1: p ≠ p0

b) H1: p > p0

c) H1: p < p0

Math2: Statistics - Lecture 9 - 7


1-Proportions Test: Example

• A semiconductor manufacturer produces controllers used in engines.


• The customer requires that the fraction defective at a critical manufacturing
step be less than 0.05 and that the manufacturer demonstrate process
capability at this level of quality using α = 0.05.
• The semiconductor manufacturer takes a random sample of 400 devices and
finds that 12 of them are defective. Can the manufacturer demonstrate
process capability to the customer?

Math2: Statistics - Lecture 9 - 8


1-Proportions Test: Example

Math2: Statistics - Lecture 9 - 9


1-Proportions Test: Example

Math2: Statistics - Lecture 9 - 10


1-Proportions Test: Example
The fraction of defective integrated circuits produced in a photolithography process is being
studied. A random sample of 300 circuits is tested, revealing 18 defectives. Test whether the
proportion of defectives is equal to 0.04, the benchmark for this process against a two sided
alternative.

Math2: Statistics - Lecture 9 - 11


1-Proportions Test : Example

Math2: Statistics - Lecture 9 - 12


Confidence Intervals

• If is the proportion of observations in a random sample of size n that


belong to the category of interest, then an approximate (1-α) confidence
interval on the population proportion belonging to this category is

where zα/2 can be obtained from page 5 of the statistical tables and formulae.

Math2: Statistics - Lecture 9 - 13


Confidence Intervals : Example

• In a random sample of 85 automobile engine crankshaft bearings, 10 has a


surface finish that is rougher than the specifications allow. Therefore, a point
estimate of the proportion of bearings in the population that exceed the
roughness specification is???

• A 95% CI for the population


proportion p is given by

Math2: Statistics - Lecture 9 - 14


Confidence Intervals: Exercise
Consider the experiment on integrated circuits on Slide 11. Using the information
before, we can construct a 95% confidence interval for the proportion of defective
integrated circuits in the photolithography process (n = 300, X = 18).

Math2: Statistics - Lecture 9 - 15


Sample Size Determination
• If is used as an estimate of p, then there is a (1 - α) chance that the error
| - p| will not exceed a specified amount when the sample size is

Math2: Statistics - Lecture 9 - 16


Sample Size Determination

• There is a small problem with this formula. We don’t know p.


• otherwise we would not be running an experiment to try to estimate it. Yet the formula for
sample size includes the value p.

• The value of p may be estimated by prior information.


• A pilot study or previous experience could be used.

• If no prior information is available, we use p = 0.5 in the formula in order


to obtain the most conservative sample size.

Math2: Statistics - Lecture 9 - 17


Sample Size Determination: Example
Recall the experiment on crankshaft bearings introduced on Slide 14. How large
a sample is required if we want to be 95% confident that the error is less than
0.05? Recall that the sample proportion is 10/85

Math2: Statistics - Lecture 9 - 18


Sample Size Determination: Exercise
Consider the experiment on integrated circuits on Slide 11. Suppose that we would like to
be able to estimate the proportion defective to within 0.02 either side of the sample
proportion of 18/300. Then we can use the sample proportion to obtain the required
sample size to do this with 99% confidence.

Math2: Statistics - Lecture 9 - 19


Sample Size Determination
If we didn’t have a good estimate for the sample proportion (such as the
benchmark), then we could obtain a conservative estimate of the sample size,
using p = 0.5.

Math2: Statistics - Lecture 9 - 20


Inference for Two Proportions

• On some occasions we actually want to compare the proportions of two


populations
• E.g. The defect rate of items produced by two different machines

• In this case our null hypothesis will be that the proportions are the same.

• Our alternative may be one sided (the proportion in one population is greater
than the other), or two sided (the proportions of the two populations are
different).

Math2: Statistics - Lecture 9 - 21


2-Proportions Test

• The hypotheses for a test for two proportions is

H0: p2 - p1 = 0
H1: p2 - p1 ≠ 0

• The test statistic is

where
Math2: Statistics - Lecture 9 - 22
Confidence Intervals

• The approximate (1-α) confidence interval for the difference of two proportions
using the normal approximation is

1 1
1 − 𝛼 %CI = 𝑝
ෞ1 − 𝑝
ෞ2 ± 𝑧𝛼/2 𝑝(1
Ƹ − 𝑝)Ƹ +
𝑛1 𝑛2

where zα/2 can be obtained from the statistical tables for the normal distribution.

Math2: Statistics - Lecture 9 - 23


2-Proportions Test: Example

Two different types of polishing solution are being evaluated for possible use in
a tumble-polish operation for manufacturing intraocular lenses used in the
human eye following cataract surgery. 300 lenses were tumble-polished using
the first polishing solution, and 253 of these had no polished-induced defects.
Another 300 lenses were polished using the second solution, and 196 of these
were satisfactory. Is there any reason to believe that the two polishing solutions
differ?

Math2: Statistics - Lecture 9 - 24


2-Proportions Test: Example

Math2: Statistics - Lecture 9 - 25


2-Proportions Test: Example

Math2: Statistics - Lecture 9 - 26


2-Proportions Test: Example

• A sample poll of 500 voters from suburb A and 400 voters from suburb B
showed that 56% and 48% respectively were in favour of a given candidate.
Test
a) If there is any difference between the suburbs.
b) If the candidate is more preferred in suburb A than suburb B.
at α = 0.05.

Math2: Statistics - Lecture 9 - 27


2-Proportions Test: Example

Math2: Statistics - Lecture 9 - 28


2-Proportions Test: Example

Math2: Statistics - Lecture 9 - 29


2-Proportions Test: Exercise
The group of researchers reported on the results of a 2005 survey of undergraduate engineering
courses. Of the 90 respondents, 68 stated that their programs included fluid dynamics. In a
similar survey conducted 20 years earlier, 66 of the 100 programs included fluid dynamics.
Conduct a hypothesis test to determine whether the proportion of courses that include fluid
dynamics has increased.

Math2: Statistics - Lecture 9 - 30


Lecture 9 Revision Exercises

See question sheet on CANVAS!

Math2: Statistics - Lecture 9 - 31

You might also like