Example Data Table
| Test Type |
Inputs |
Tail |
Alpha |
Expected Use |
| One mean z |
mean 52, null 50, sigma 8, n 64 |
Two tailed |
0.05 |
Known population sigma |
| One mean t |
mean 21.5, null 20, s 4.2, n 25 |
Right tailed |
0.05 |
Estimated standard deviation |
| Two proportion z |
x1 45, n1 120, x2 35, n2 110 |
Two tailed |
0.05 |
Compare two rates |
| Chi-square fit |
Observed 12,18,20,25; Expected 15,15,20,25 |
Right tailed |
0.05 |
Compare category counts |
Formula Used
Direct mode: The calculator finds p from the selected distribution and tail direction.
One mean z: z = (x̄ - μ0) / (σ / √n).
One mean t: t = (x̄ - μ0) / (s / √n), with df = n - 1.
Two mean z: z = [(x̄1 - x̄2) - Δ0] / √(σ1²/n1 + σ2²/n2).
Welch t: t = [(x̄1 - x̄2) - Δ0] / √(s1²/n1 + s2²/n2).
One proportion z: z = (p̂ - p0) / √[p0(1 - p0) / n].
Chi-square fit: χ² = Σ[(O - E)² / E].
How to Use This Calculator
Select a calculation mode first. Enter only the values needed for that mode. Direct mode needs a statistic and matching distribution. T, chi-square, and F tests also need degrees of freedom. Choose left, right, or two tailed. Set alpha. Press calculate. Use CSV or PDF for export.
Understanding Test Statistics and P Values
A test statistic turns sample evidence into one standard number. It shows how far the data sits from the null claim. Large absolute values often mean stronger evidence. The p value then measures tail area. It answers a focused question. How likely is evidence this extreme, if the null claim is true?
Why This Calculator Helps
Manual p value work can be slow. Each test uses a different distribution. Z tests use the normal curve. T tests use degrees of freedom. Chi-square tests use right tail areas. F tests compare variance ratios. This calculator joins those paths in one form. It also gives a decision using your alpha level.
Tests Included
Use the direct statistic mode when you already know z, t, chi-square, or F. Use the one mean modes for sample mean problems. Select z when population sigma is known. Select t when sigma is estimated by sample standard deviation. Use two mean modes for independent groups. Welch t mode is useful when group spreads differ. Proportion modes handle counts, rates, and survey results. The chi-square fit mode compares observed and expected frequencies.
Reading the Result
A small p value does not prove the alternative claim. It shows the data is unusual under the null model. Compare p with alpha. If p is less than or equal to alpha, reject the null claim. Otherwise, fail to reject it. State the test, statistic, p value, alpha, and direction. Keep wording careful.
Good Statistical Practice
The result is only as useful as the assumptions. Check independence before using most tests. Look for random sampling or random assignment. For normal or t procedures, inspect sample size and outliers. For chi-square tests, expected counts should usually be large enough. For F tests, confirm both samples are positive and independent.
Use in Reports
The export buttons create a simple record. CSV helps spreadsheets. PDF helps quick sharing. The example table shows common inputs. You can adjust values and test directions. Use this tool as a guide, not as a replacement for study design, context, or professional statistical judgment. Record assumptions with every calculation. This habit makes later review easier. It reduces mistakes when several analyses support one conclusion.
FAQs
What is a test statistic?
A test statistic is a standardized value. It compares sample evidence with a null claim. Its scale depends on the selected distribution, such as z, t, chi-square, or F.
What is a p value?
A p value is a tail probability. It shows how unusual the observed evidence is under the null hypothesis. Smaller values usually show stronger evidence against the null claim.
Which tail option should I choose?
Use right tailed for greater-than alternatives. Use left tailed for less-than alternatives. Use two tailed when the alternative only says the parameter is different.
When should I use a t test?
Use a t test for mean problems when population sigma is unknown. The calculator uses sample standard deviation and degrees of freedom for the p value.
When should I use a z test?
Use a z test when the statistic follows the standard normal curve. It is common for known sigma mean tests and many large sample proportion tests.
Does a small p value prove the alternative?
No. A small p value suggests evidence against the null model. It does not prove a claim. Study design, assumptions, and data quality still matter.
What alpha value should I use?
Common alpha values are 0.05, 0.01, and 0.10. Choose alpha before looking at the result. Your field, risk level, and study rules may guide it.
Can I export the result?
Yes. Use the CSV button for spreadsheet records. Use the PDF button for a simple printable summary. Both exports use the current form values.