All courses › Statistics
BETA Many questions in this subject are new and not yet reviewed by a teacher, so mistakes can occur · added 16.10.2026.
Statistics: free practice, theory and problems
Descriptive statistics summarise data with a few numbers: where is the centre, and how much do the data spread?
Contents
1. Descriptive statistics
What is it about?
Descriptive statistics summarise data with a few numbers: where is the centre, and how much do the data spread?
In short
- Mean: .
- Median: the middle value when the data are sorted. Little affected by extreme values.
- Mode: the most frequent value.
- Range: largest minus smallest value.
- Sample standard deviation: .
- For skewed distributions (for example income) the median is often more representative than the mean.
Data and variables
Statistics starts with data: observations of one or more variables. It helps to distinguish between
- categorical variables (gender, industry, county) – here you count frequencies and use bar or pie charts
- numerical variables, which can be discrete (number of children, cars sold) or continuous (income, height, time). Here you use histograms, box plots and measures of centre and spread.
Also distinguish the population (all the units you want to say something about) from the sample (those you actually measured). Descriptive statistics summarises the sample; inference (confidence intervals, hypothesis tests) generalises to the population.
Measures of centre
- Mean . Strongly affected by extreme values.
- Median: the middle value when the data are sorted (the average of the two middle values for an even count). Robust to extremes – which is why Statistics Norway often reports median income.
- Mode: the most frequent value; the only one that makes sense for categorical data.
For right-skewed distributions (such as income and house prices: many low values and a few very high ones) the mean is larger than the median.
Measures of spread
- Range: largest minus smallest value.
- Quartiles: (25 % below), the median () and (75 % below). The interquartile range shows the spread of the middle 50 %.
- Sample variance and standard deviation . The standard deviation has the same unit as the data and can be read as a typical distance from the mean. We divide by in samples to get an unbiased estimator.
- Coefficient of variation : relative spread, useful when comparing variables of different size.
Box plots and outliers
A box plot shows the minimum, , median, and maximum. Values more than outside the box are often marked as outliers. Investigate them: a measurement error, or a real and interesting observation?
Relationships between two variables
A scatter plot shows the relationship between two numerical variables. The correlation coefficient lies between −1 and 1 and measures how strong the linear relationship is. near 0 means no linear relationship (but maybe a curved one). Remember: correlation is not causation – ice-cream sales and drownings correlate because both rise in summer.
Example
Salaries 400, 450, 500, 520 and 2000 (thousand NOK): mean 774, median 500. One high salary pulls the mean up.
2. Probability distributions
🔗 Shared curriculum with Mathematics S2. The questions are the same, but your progress counts separately for each subject.
What is it about?
A probability distribution tells you how likely each possible outcome is. With the expected value and the standard deviation you describe the "centre" and the "spread". The two most important distributions are the binomial distribution and the normal distribution.
Concepts and formulas
- Expected value: . For a die: .
- Variance , standard deviation .
- Binomial distribution ( independent trials, probability of success): , , .
- The normal distribution : bell-shaped. About 68 % lies within , 95 % within and 99.7 % within .
- Standardisation: , and . Key values: , .
- The central limit theorem: sums and averages of many independent variables become approximately normally distributed.
Random variables
A random variable is a number that depends on the outcome of a random experiment – e.g. the number of sixes in ten throws, or defective items in a box. A probability distribution shows which values can take and the probability of each.
Expectation and standard deviation
- The expected value is the long-run average: .
- The variance measures spread: , and the standard deviation is .
In a lottery where a ticket costs 20 kr and the expected prize is 12 kr, you lose 8 kr per ticket on average.
The binomial distribution
Used when an experiment is repeated independent times, each with only two outcomes (success/failure) and the same probability of success:
with and .
Worked example
10% of a machine's items are defective. You take 20. The probability that none are defective is , and of at least one is . The expected number of defects is .
The hypergeometric distribution
When you draw without replacement from a small group (e.g. 5 cards from a deck), the probability changes with each draw. Then we use the hypergeometric distribution:
where is the total, the number of 'special' items and the number drawn.
The normal distribution
Many measurements – height, measurement error, test scores – follow a bell-shaped curve, the normal distribution, defined by and :
- about 68% of values lie within ,
- about 95% within ,
- about 99.7% within .
To find probabilities we standardise: and use a table or GeoGebra's probability calculator.
Worked example
Heights of 18-year-old boys are normally distributed with cm and cm. The share above 194 cm: , and .
The central limit theorem
The mean of many independent measurements is approximately normally distributed, whatever the distribution of the individual measurements. That's why the normal distribution is so important in statistics – and a binomial distribution with large can be approximated by a normal distribution.
Example
The height of 18-year-olds is cm. The share below 182 cm is .
3. Confidence intervals
What is it about?
A sample gives an estimate, but how certain is it? A confidence interval gives a range that, with a given confidence (often 95 %), contains the true value.
In short
- 95 % confidence interval for a mean (known or large sample): .
- For a proportion : .
- The margin of error halves when the sample becomes four times as large.
- 95 % means: if we repeat the survey many times, about 95 % of the intervals contain the true value.
From sample to population
We want to know a parameter of the population – for example the average purchase among all customers, or the share who will vote for a party. We cannot ask everyone, so we draw a random sample and calculate an estimator: for , for . A new sample would give a slightly different answer. This sampling variation is why we report an interval instead of a single number.
The central limit theorem
If the sample is large enough (rule of thumb ), is approximately normally distributed with mean and standard deviation – whatever the distribution of the data themselves. is called the standard error. It shrinks with the square root of : to halve the uncertainty you need a sample four times as large.
The interval for a mean
- for 90 %, for 95 % and for 99 % confidence.
- When is unknown and estimated by , especially in small samples, the t-distribution with degrees of freedom is used instead of . It has heavier tails, so the interval gets a little wider. For large , and are almost equal.
- The term is the margin of error.
The interval for a proportion
Example: in a poll of 1000 people, 25 % say they will vote for a party. The margin of error is , giving the 95 % interval 22.3 % to 27.7 %. That is why changes of one or two percentage points between polls are often just noise.
How to interpret a confidence interval
Right: "The method gives intervals that capture the true value 95 % of the time." If we repeated the survey 100 times, about 95 of the intervals would contain . Wrong: "There is a 95 % probability that lies in exactly this interval" – is a fixed number; it is the interval that varies.
What affects the width?
- Higher confidence level → wider interval (more certain, but less precise).
- Larger sample → narrower interval.
- More spread in the data → wider interval.
- Required sample size for margin of error : .
Example
A poll of 1000 people gives 30 % support. Margin of error: , i.e. 30 % ± 2.8 percentage points.
4. Hypothesis testing
🔗 Shared curriculum with Mathematics S2. The questions are the same, but your progress counts separately for each subject.
What is it about?
A hypothesis test decides whether data give enough reason to reject a claim. Is a coin biased? Does a new medicine work? Has a new teaching method raised the average grade?
Concepts and formulas
- The null hypothesis : "no change", for example .
- The alternative hypothesis : what we want to show, for example (one-sided) or (two-sided).
- Significance level : usually 5 %. It is the probability of rejecting even though it is true (type I error).
- P-value: the probability of a result at least as extreme as the one observed, **given that is true**.
- Decision: if the p-value is less than , we reject . Otherwise we do not have enough evidence (that does not mean is proved).
- Test statistic for a mean: . For a proportion: .
- One-sided test at the 5 % level: reject when . Two-sided: when .
The idea
In a hypothesis test we use data from a sample to decide whether there is reason to believe something has changed or is different from what is claimed. The reasoning is like a trial: we assume 'innocence' until the evidence is strong enough.
The hypotheses
- Null hypothesis : 'no change' – the established or claimed situation. E.g.: 'The defect rate is 5%' ().
- Alternative hypothesis : what we want to see if we have evidence for. E.g.: 'The rate is higher than 5%' (, a one-sided test) or 'the rate differs from 5%' (two-sided).
The hypotheses must be stated before looking at the data.
Significance level and p-value
- The significance level (often 5%) is the risk we accept of rejecting a true null hypothesis.
- The p-value is the probability of a result at least as extreme as the one observed, **if is true**.
- Conclusion: if the p-value is less than , we reject – the result is statistically significant. Otherwise we have no grounds to reject (which doesn't prove true!).
Worked example (binomial)
A manufacturer claims only 5% of items are defective. You check 50 and find 6 defective. Test at whether the rate is higher.
- : . : .
- Under , is binomial with , (2.5 expected).
- p-value: .
- , so we **reject **: there is reason to believe the defect rate exceeds 5%.
Types of error
- Type I error: rejecting when it is true (false alarm). Its probability is at most .
- Type II error: not rejecting when it is false (missing a real change).
A lower gives fewer type I but more type II errors. A larger sample reduces both.
Testing a mean
For measurements (weight, time, grades) we often test whether the mean has changed, using the normal distribution (or the t-distribution when the standard deviation is unknown and the sample small). The test statistic is
Statistical and practical significance
A result can be statistically significant without being important in practice – with large samples even tiny differences become significant. Always consider how large the effect is, and whether the sample is random and representative.
Example
A coin gives 60 heads in 100 tosses. , . . The p-value is , so we reject : the coin appears to be biased.
Example problems with solutions
Here are some of the problems in statistics. In the app, calculation problems get new numbers every time, so you can practise until it sticks – and take a practice exam with an indicative grade as you prepare for the exam.
Descriptive statistics: What is the median of 3, 7, 2, 9, 5?
Answer: 5
Sorted: 2, 3, 5, 7, 9. The middle one is 5.
Probability distributions: What is the expected value when you roll one die?
Answer: 3.5
.
Confidence intervals: How much larger must the sample be to halve the margin of error?
Answer: 4 times
The margin of error is proportional to , and .
Hypothesis testing: What is the p-value?
Answer: The probability of a result at least as extreme if is true
The p-value is calculated assuming that holds.