Probability & Statistics in Engineering

Fall 2023 - 28 Nov

Example

The specification for yield strength of rebars requires a mean value of 38 psi. From the rebars delivered at the site, we choose 25 at random to test: the sample mean was 37.5 psi and it is known that the standard deviation of rebar strength from the supplier is 3.0 psi.

critical_regions.png

\[H_0: \mu_Y = 38\text{ psi}\]

\[H_1: \mu_Y < 38\text{ psi}\]

\[z = \dfrac{\overline{x}-\mu}{\sigma / \sqrt{n}}\]

\[z=\dfrac{37.5-38}{3.0/\sqrt{25}}=-0.833\]

At 5% significance level, \(z_a=\Phi^{-1}(0.05)=-1.95\) and since \(z\) is outside the critical region we cannot reject \(H_0\)

Tests on the mean of a normal distribution, variance known

Suppose that we wish to test the hypotheses \(H_0: \mu = \mu_0\) and \(H_1: \mu \neq \mu_0\). If we have a random sample \(X_1\), \(X_2\),…, \(X_n\) we can use the test statistic \[z_0 = \dfrac{\overline{x}-\mu_0}{\sigma / \sqrt{n}}\] which follows a \(N(0,1)\).

Distribution of \(z_0\)

hypothesis_test_pdfs.png

P-values for a \(z\) test

p-value_pdfs.png

Summary

test_mean_var_known_summary.png

Type II error and sample size

\(H_0: \mu = \mu_0\) and \(H_1: \mu \neq \mu_0\)

Suppose that \(H_0\) is false and \(\mu=\mu_0+\delta\)

\[E[Z_0]=\dfrac{E[\overline{X}]-\mu_0}{\sigma / \sqrt{n}} = \dfrac{(\mu_0+\delta)-\mu_0}{\sigma / \sqrt{n}} = \dfrac{\delta \sqrt{n}}{\sigma}\]

\[Z_0 \sim N\left( \dfrac{\delta \sqrt{n}}{\sigma}, 1 \right)\]

type_2_error_pdfs.png

Probability of a Type II error for a two-sided test on the mean, variance known

\[\beta = \Phi \left( z_{\alpha/2}-\dfrac{\delta \sqrt{n}}{\sigma} \right) - \Phi \left( -z_{\alpha/2}-\dfrac{\delta \sqrt{n}}{\sigma} \right)\]

Sample size formulas

\[\beta \approx \Phi \left( z_{\alpha/2}-\dfrac{\delta \sqrt{n}}{\sigma} \right)\]

\(z_{\beta}=-\Phi^{-1}(\beta)\) then \(-z_{\beta} \approx z_{\alpha/2}-\dfrac{\delta \sqrt{n}}{\sigma}\)

\[n \approx \dfrac{(z_{\alpha/2}+z_{\beta})^2 \sigma^2}{\delta^2}\] \[\delta=\mu-\mu_0\]

Problem 20.1

Suppose that the true burning rate of a propellant is 49 cm/s but the specifications require it to be 50 cm/s. If we know that the standard deviation is 2 cm/s, what is \(\beta\) for the two-sided test with \(\alpha=0.05\) and \(n=25\)?

What would be the sample size if the required test power is 90%?

Example

What if the variance in the rebar example is unknown? Suppose that the sample mean is 37.5 psi and the sample standard deviation is 3.50 psi. Can you reject the null hypothesis about the mean?

Tests on the mean of a normal distribution, variance unknown

test_mean_var_unknown_summary.png

Tests on the variance of a normal distribution

test_var_summary.png
test_var_pdfs.png

Problem 20.2

A study of the thermal inertia properties of concrete had 5 samples tested and the average interior temperature was 23.01, 22.22, 22.04, 22.62, and 22.59 deg C. Test the hypothesis for \(\mu=22.8\) and 5% significance level.

What is the p-value?

Problem 20.3

Research in traffic accidents suggest that a good predictor is the difference in speeds among the vehicles. The researcher believes that when the standard deviation of vehicle speeds exceeds 10 mph, the rate of accidents increases. During 1 hour, the following 50 sample speeds are measured

prob_20_3.png

Do the data indicate that the standard deviation in vehicle speeds exceeds 10 mph? Use \(\alpha=0.05\) in reaching your conclusion.

Tests on the equality of means of normal distributions

Assume that \(X_1\),…, \(X_n\) and \(Y_1\),…,\(Y_m\) are independent samples from \(\text{N}(\mu_x, \sigma^2_x)\) and \(\text{N}(\mu_y, \sigma_y^2)\)

Null hypothesis \[H_0: \mu_x=\mu_y\] Alternative hypothesis: \[H_1: \mu_x \neq \mu_y\]

How close is $\overline{X}-\overline{Y}$ to 0?

\[\overline{X}-\overline{Y} \sim \left( \mu_x-\mu_y, \dfrac{\sigma_x^2}{n}+\dfrac{\sigma_y^2}{m} \right)\]

accept \(H_0\): \(\dfrac{|\overline{X}-\overline{Y}|}{\sqrt{\sigma_x^2/n}+\sigma_y^2/m} \leq z_{a/2}\)

reject \(H_0\): \(\dfrac{|\overline{X}-\overline{Y}|}{\sqrt{\sigma_x^2/n}+\sigma_y^2/m} \geq z_{a/2}\)

Readings

  • Sections 8.1-8.2
  • Section 8.3
  • Section 8.4.1
  • Section 8.5 (up to p. 337)