Z-Test Calculator
Statistics, Inference
Intro: Runs z-tests for means (one-sample or two-sample) when population standard deviations are known, providing z, p, and decision.
Worked example
- A machine fills bags with mean weight x̄=105.2g, known σ=15g, n=40. Test H₀: μ=100 vs H₁: μ≠100 at α=0.05.
- We perform a two-sided one-sample z-test with $H_0: \mu = 100$ and $H_1: \mu \neq 100$.
- The z-statistic is $z=\dfrac{\bar{x}-\mu_0}{\sigma/\sqrt{n}}$.
- Substitute $\bar{x}=105.2$, $\mu_0=100$, $\sigma=15$, and $n=40$.
- Compute the numerator: $\bar{x}-\mu_0 = 105.2 - 100 = 5.2$.
- Compute the standard error: $\sigma/\sqrt{n} = 15/\sqrt{40} \approx 15/6.3249 \approx 2.372$.
- Now $z = 5.2 / 2.372 \approx 2.19$.
- For a standard normal distribution, $|z|=2.19$ gives a two-sided p-value of about $p \approx 0.0286$.
- Compare with $\alpha=0.05$. Since $p < 0.05$, we reject $H_0$.
- Conclusion: there is significant evidence that the true mean weight is different from 100g.
- Answer: $\boxed{z \approx 2.19,\; p \approx 0.029 \Rightarrow \text{reject }H_0.}$
FAQs
When should I use a z-test instead of a t-test?
Use a z-test when the population standard deviation σ is known and n is reasonably large; otherwise use a t-test with sample s.
Why choose MathGPT?
- Get clear, step-by-step solutions that explain the “why,” not just the answer.
- See the rules used at each step (power, product, quotient, chain, and more).
- Optional animated walk-throughs to make tricky ideas click faster.
- Clean LaTeX rendering for notes, homework, and study guides.
How this calculator works
- Type or paste your function (LaTeX like
\sin,\lnworks too). - Press Generate a practice question button to generate the derivative and the full reasoning.
- Review each step to understand which rule was applied and why.
- Practice with similar problems to lock in the method.