MANE 3332.03
Lecture 24, April 22
-
Topics:
- Chapter 9, Case 2
- Errors in Hypothesis Testing
-
Assignments:
- New: Chapter 9, Case 1 Upper Quiz (assigned 4/22/2025, due 4/24/2025)
- New: Chapter 9, Case 1 Lower Quiz (assigned 4/22/2025, due 4/24/2025)
- New: Chapter 9, Case 1 2-sided Quiz (assigned 4/22/2025, due 4/23/2025)
- New: Chapter 9, Case 2 Upper Practice Problems (assigned 4/22/2025, due 4/24/2025)
- New: Chapter 9, Case 2 Lower Practice Problems (assigned 4/22/2025, due 4/24/2025)
- New: Chapter 9, Case 2 2-sided Practice Problems (assigned 4/22/2025, due 4/23/2025)
- New: Technical Report Two (assigned 4/17/2025, due 5/15/2025)
-
Attendance
- Questions?
Handouts
Class Schedule
| Tuesday Lecture | Thursday Lecture |
|---|---|
| 4/22: Chapter 9, Case 2 | 4/24: Chapter 9, Case 3 |
| 4/29: Chapter 11 | 5/1: Chapter 11 |
| 5/6: Review | 5/8: Dead Day (no class) |
5 Sessions plus final exam
Final Exam: Tuesday May 13, 2025 10:15 am - 12:00 pm
Errors in hypothesis testing
-
Whether a correct decision is made depends upon the true nature of \(H_0\) and the decision arrived at.
-
A type I error occurs when the null hypothesis is true and the outcome of the test is to reject \(H_0\). The probability of a type I error is denoted as \(\alpha\)
-
A type II error occurs when the null hypothesis is false and the outcome of the test is to fail to reject \(H_0\). The probability of a type II error is denoted as \(\beta\).
-
The power of a statistical test is the probability rejecting the null hypothesis \(H_0\) when the alternative hypothesis is true. \(\mbox{Power}=1-\beta\)

Error Example: Manufacturing
Error Example: Medical
Chapter 9, Case 1 - Type II error and sample size for a two-tailed test
- Probability of type II error for the two-tailed test
where \(\mu=\mu_0+\delta\)
- The sample to detect a difference between the true and hypothesized mean of \(\delta\) with power at least \(1-\beta\) is
where \(\delta=\mu-\mu_0\)
Type II error and sample size for the one-tailed tests
- For an upper-tailed test
- For a lower-tailed test
- The sample size required to detect a difference between the true mean and hypothesized mean of \(\delta\) with power at least \(1-\beta\) is
If \(n\) is not an integer, round up to the nearest integer
R: Chapter 9 Case 1 Hypothesis Testing

Power using OC-Curve
Find the power when the true mean value is 3.325

R: Chapter 9 Case 1 Power

Type II Error Rate and Sample Size
- You will not be required to calculate or use OC-curves
- You must understand the concept and be able to correctly identity type I and type II error
Chapter 9, Case 2
Hypothesis Test on the Mean, Variance Unknown
-
Much more common case than variance known
-
Substitute \(S\) for \(\sigma\)
-
The test statistics is now a \(t\) random variable
Summary of Case 2

Problem 9.3.6



Classical Approach
Hypothesis Test Using R

Normal Probability Plot

\(P\)-values
-
More difficult to calculate since the \(t\)-tables only contain a few quantiles
-
Can use tables to generate bounds on the \(p\)-value
-
Software will provide \(p\)-values
P-values from R

Power Calculations
-
Are much more complicated
-
The true distribution is now a non-central \(t\)
-
Use tables to solve (Chart VII in appendix) or software
Power Calculation using R

Sample Size using R

Chapter 9, Case 2 2-sided Practice Problems
Chapter 9, Case 2 Lower Practice Problems
Chapter 9, Case 2 Upper Practice Problems
Case 3. Hypothesis Test on Variance of Normal Population
- The test statistics is a \(\chi^2\) random variable
- The table below summarizes the three possible hypothesis tests. The rejection regions are clearly shown in Figure 9-17 on page 222
Figure 9-17

Test Summary
- See summary in your textbook

Problem 7.108
Problem taken from Ostle, Turner, Hicks and McElrath (1996). Engineering Statistics: The Industrial Experience. Duxbury Press.

Statistics for Problem 7.108

Classical Approach
Problem 7.108 Plots

Problem 7.108 Plots

Problem 7.108 Shapiro-Wilks Test

p-values
-
Very similar to the case for the mean of a normal population with variance unknown
-
Difficult to calculate since the \(\chi^2\)-tables only contain a few quantiles
-
Can use tables to generate bounds on the \(p\)-value
-
Software will provide \(p\)-values
Test on Variance using R (EnvStats)

Power Calculations
-
Can be done with OC curves found in Table VIIi--n
-
Can be done in software such as R
Test on Standard Deviation
- What about test on standard deviation?
Chapter 9, Case 3 2-sided Practice Problems
Practice Problem Chapter 9, Case 3 Lower
Practice Problem Chapter 9, Case 3 Upper
Case 4. Hypothesis Test on a Population Proportion
- The test statistics for the hypothesis test is

Problem 9.5.2

Problem 9.5.2 Classic Approach
Power Calculations
- For the two-sided alternative hypothesis
- If the alternative is \(H_1:p<p_0\)
- and finally if the alternative hypothesis is \(H_1:p>p_0\)
Sample Size
- Sample size requirements to satisfy type II(\(\beta\)) error constraints for a two-tailed hypothesis test is given by
-
For a sample size for a one-sided test substitute \(z_\alpha\) for \(z_{\alpha/2}\).
-
Problem 9.95
Testing for Goodness of Fit
-
Material is presented in section 9-7 of your textbook
-
Procedure determines if the sample data is from a specified underlying distribution
-
Procedure uses a \(\chi^2\) distribution
-
Example 9-12 presents a \(\chi^2\) goodness of fit test for a Poisson example
-
Example 9-13 presents a \(\chi^2\) goodness of fit test for a normal example
Procedure
-
Collect a random sample of size \(n\) from a population with an unknown distribution,
-
Arrange the \(n\) observations in a frequency distribution containing \(k\) classes
-
Calculate the observed frequency in each class \(O_i\),
-
From the hypothesized distribution, calculate the expected frequency in class \(i\), denoted \(E_i\) (if \(E_i\) is small combine classes)
-
Calculate the test statistic
- Reject the null hypothesis if the calculated value of the test statistic \(\chi^2_0>\chi^2_{\alpha,k-p-1}\) where \(p\) is the number of parameters in the hypothesized distribution
Example 9.12, part 1

Example 9.12, part 2

Chapter 9 Summary
- You should be prepared to work any practice problems assigned: Cases 1-3 with three different alternatives
- All other information is conceptual knowledge that can be questioned with multiple choice
- Name 3 ways to test if data is from a normal distribution