Statistics Calculator: Mean, Median, Mode, Standard Deviation, Variance & Probability

Use our free Statistics Calculator to compute descriptive statistics, probability distributions, and regression from any dataset.

MODULE 1: MEASURES OF CENTRAL TENDENCY

Mean (Arithmetic Average)

Mean (x̄) = Σx / n = (x₁ + x₂ + ... + xₙ) / n

Example: Data: 4, 7, 2, 9, 5, 8, 3, 6 x̄ = (4+7+2+9+5+8+3+6) / 8 = 44/8 = 5.5

Weighted mean: x̄_w = Σ(wᵢxᵢ) / Σwᵢ

Example: Exam scores: 70 (weightage 2), 85 (weightage 3), 90 (weightage 1) Weighted mean = (70×2 + 85×3 + 90×1) / (2+3+1) = (140+255+90)/6 = 485/6 = 80.83


Median (Middle Value)

For ungrouped data: 1. Sort data in ascending order 2. If n is odd: Median = value at position (n+1)/2 3. If n is even: Median = average of values at positions n/2 and n/2 + 1

Example (odd n): 3, 5, 7, 9, 11 → n = 5, median at position 3 → Median = 7

Example (even n): 2, 4, 6, 8, 10, 12 → n = 6 Median = (6th/2 + 6/2+1th value) / 2 = (6 + 8)/2 = 7

For grouped data (frequency distribution): Median = L + [(n/2 − cf) / f] × h Where: L = lower boundary of median class, n = total frequency, cf = cumulative frequency before median class, f = frequency of median class, h = class width


Mode (Most Frequent Value)

For ungrouped data: The value that appears most often.

Example: 3, 5, 3, 7, 3, 8, 5 → Mode = 3 (appears 3 times)

Bimodal: 2, 3, 3, 5, 7, 7, 9 → Mode = 3 and 7

For grouped data: Mode = L + [(f₁ − f₀) / (2f₁ − f₀ − f₂)] × h Where: L = lower boundary of modal class (highest frequency), f₁ = frequency of modal class, f₀ = frequency of pre-modal class, f₂ = frequency of post-modal class, h = class width

Empirical relationship: Mode ≈ 3 Median − 2 Mean (for moderately skewed distributions)


MODULE 2: MEASURES OF DISPERSION

Range

Range = Maximum value − Minimum value

Simple but sensitive to outliers.


Variance and Standard Deviation

Population Variance: σ² = Σ(xᵢ − μ)² / N Population SD: σ = √(σ²)

Sample Variance: s² = Σ(xᵢ − x̄)² / (n−1) ← use n−1 (Bessel's correction) Sample SD: s = √(s²)

Computational shortcut (easier for hand calculation): σ² = (Σx²/n) − (x̄)²

Worked Example: Data: 2, 4, 4, 4, 5, 5, 7, 9 (n=8) x̄ = 40/8 = 5 Σ(xᵢ − x̄)²: (2−5)²+(4−5)²+(4−5)²+(4−5)²+(5−5)²+(5−5)²+(7−5)²+(9−5)² = 9+1+1+1+0+0+4+16 = 32

Population variance σ² = 32/8 = 4 Population SD σ = √4 = 2


Standard Deviation from Frequency Table

Class IntervalMidpoint (x)Frequency (f)fx(x − x̄)(x − x̄)²f(x − x̄)²
0–105315−15225675
10–20157105−525175
20–302510250525250
30–40355175152251,125
Total255452,225

x̄ = 545/25 = 21.8 σ² = 2225/25 = 89 σ = √89 ≈ 9.43


Coefficient of Variation (CV)

Used to compare variability between datasets with different means.

CV = (σ / x̄) × 100%

Higher CV = more relative variability Example: Dataset A (mean=100, σ=15): CV = 15% Dataset B (mean=20, σ=5): CV = 25% → Dataset B is relatively more variable despite smaller absolute SD


MODULE 3: PROBABILITY

Basic Probability Rules

RuleFormula
Basic probabilityP(A) = Favourable outcomes / Total outcomes
ComplementP(A') = 1 − P(A)
Addition (mutually exclusive)P(A ∪ B) = P(A) + P(B)
Addition (general)P(A ∪ B) = P(A) + P(B) − P(A ∩ B)
Multiplication (independent)P(A ∩ B) = P(A) × P(B)
Conditional probability**P(AB) = P(A ∩ B) / P(B)**
Bayes' theorem**P(AB) = P(BA)P(A) / P(B)**

Worked Example: A bag has 4 red and 6 blue balls. Two drawn without replacement. P(both red)? P(1st red) = 4/10 P(2nd red | 1st red) = 3/9 P(both red) = 4/10 × 3/9 = 12/90 = 2/15


Probability Distributions

#### Binomial Distribution

For n independent trials, each with probability p of success:

P(X = r) = ⁿCᵣ × pʳ × (1−p)^(n−r)

Mean = np | Variance = np(1−p) | SD = √(np(1−p))

Example: Toss a fair coin 10 times. P(exactly 6 heads)? P(X=6) = ¹⁰C₆ × (0.5)⁶ × (0.5)⁴ = 210 × (0.5)¹⁰ = 210/1024 ≈ 0.205

#### Normal Distribution

Bell-shaped, symmetric. Defined by mean (μ) and SD (σ).

Empirical Rule (68-95-99.7):

Z-score (standardisation): Z = (X − μ) / σ Z-score tells you how many standard deviations X is from the mean.


MODULE 4: CORRELATION AND REGRESSION

Pearson Correlation Coefficient

r = Σ[(xᵢ − x̄)(yᵢ − ȳ)] / √[Σ(xᵢ − x̄)² × Σ(yᵢ − ȳ)²]

r valueInterpretation
+1.0Perfect positive correlation
+0.7 to +1.0Strong positive
+0.3 to +0.7Moderate positive
0 to +0.3Weak positive
0No linear correlation
−0.3 to 0Weak negative
−0.7 to −0.3Moderate negative
−1.0Perfect negative correlation

Shortcut formula: r = [nΣxy − ΣxΣy] / √{[nΣx² − (Σx)²][nΣy² − (Σy)²]}

Linear Regression

Regression line of y on x: y = a + bx

Slope: b = [nΣxy − ΣxΣy] / [nΣx² − (Σx)²]

Intercept: a = ȳ − b x̄


MODULE 5: QUICK REFERENCE FORMULAS

Permutations and Combinations

FormulaWhen to Use
ⁿPᵣ = n! / (n−r)!Ordered arrangements
ⁿCᵣ = n! / [r!(n−r)!]Unordered selections
n!n objects, all arranged

Important Statistical Tests (Brief)

TestUse CaseDecision
Z-testLarge sample (n>30), σ knownz > 1.96 → reject H₀ at 5%
t-testSmall sample (n<30), σ unknowncompare t to critical value
Chi-square (χ²)Categorical data, goodness of fitχ² = Σ(O−E)²/E

FAQ

What is the difference between standard deviation and variance?
Variance (σ²) is the average squared deviation from the mean — hard to interpret because it's in squared units. Standard deviation (σ) is the square root of variance, back in the original units of the data. SD is always preferred for interpretation: if heights are in cm, SD is in cm (not cm²).
When should I use mean vs. median?
Use mean when: data is symmetric with no extreme outliers (most normal data). Use median when: data is skewed or has outliers (house prices, incomes — a billionaire in a neighbourhood skews the mean but not the median). Rule of thumb: if mean and median are far apart, the data is skewed and median is more representative.
What does a p-value of 0.03 mean?
It means there is a 3% probability of observing data as extreme as yours (or more extreme) if the null hypothesis were actually true. Since 0.03 < 0.05 (the conventional significance threshold), you reject the null hypothesis. It does NOT mean there is a 97% probability that your hypothesis is correct — a common misinterpretation.
How is standard deviation calculated from a frequency table?
Use midpoints of each class interval as x values. Calculate weighted mean: x̄ = Σfx/Σf. Then for each class, compute f(x − x̄)². Sum these and divide by total frequency (Σf) for variance. Take square root for SD. See the worked example above with the class interval table.

Try the Free Statistics Calculator

Use ToolMira's calculator — no signup, no ads, works on mobile.

Open Calculator →
AM
Written by Ananya Menon
Ananya writes about personal finance, tax, and investing for ToolMira, breaking down India's money rules into plain language with worked examples.

Disclaimer: This article is for educational purposes only and does not constitute financial, investment, or professional advice. Please consult a qualified professional before making any decisions based on this content.