13A

Random variables and frequency tables

Categorical, discrete and continuous variables, frequency and relative frequency tables, relative frequency as an estimate of probability, histograms and polygons, and the mode.

Probability in chapter 14 started from equally likely outcomes. Most real questions don't have them: how many goals will the team score, how tall is a randomly chosen student? Data answers these. A frequency table is the first step in turning a pile of results into a probability you can use.

Three types of variable

The quantity being recorded is a random variable, usually called $X$. Before drawing anything, decide which type it is.

TypeHow you get a valueExamples
CategoricalChoose a labelFavourite sport, eye colour, postcode
Discrete numericalCountGoals scored, number of siblings
Continuous numericalMeasureHeight, time, mass

A quick test: if a value of $2.5$ makes sense, the variable is continuous. Half a goal makes no sense, so goals are discrete.

Frequency and relative frequency

A soccer team recorded the number of goals it scored in each of its $25$ games.

Goals $x$01234Total
Frequency $f$4784225
Relative frequency0.160.280.320.160.081

Relative frequency is the experimental side of probability from 14B. The more results you have, the more you can trust it as an estimate.

Example 1●●

Use the table to estimate (a) the probability that the team scores at least $3$ goals in a game (b) how many games in a $50$-game season it will score at least $3$.

(a) $P(X \ge 3) \approx \dfrac{4 + 2}{25} = 0.24$
At least 3 means 3 or 4. Add their frequencies and divide by the total.
(b) $0.24 \times 50 = 12$ games
Expect that fraction of the 50 games.

Graphing the data

  • A frequency histogram has a column centred on each value, with the columns touching. Its height is the frequency.
  • A frequency polygon joins the midpoints of the tops of the columns, and drops to the axis one step beyond each end.
  • A relative frequency histogram looks identical, with the vertical axis relabelled $\tfrac{f}{n}$.
  • Categorical data uses a column graph with gaps between the columns, because there is nothing between "soccer" and "netball".

Your turn

A spinner was spun $40$ times and landed on red $14$ times, blue $18$ times and green $8$ times. What type of variable is the colour? Estimate how many times it will land on blue in $200$ spins.

Show the working

Colour is categorical. The relative frequency of blue is $\dfrac{18}{40} = 0.45$, so in $200$ spins expect about $0.45 \times 200 = 90$ blues.

Flashcards
Relative frequency
$\dfrac{f}{n}$. The relative frequencies add to $1$.
Mode
The value with the highest frequency.
Discrete or continuous?
Discrete is counted. Continuous is measured.
Practice
  1. The number of cars in a household's driveway is:

  2. The temperature at noon each day is:

  3. A survey records each student's phone number. This variable is:

  4. The numbers of books read last month by some students were: $0$ books, $6$ students; $1$ book, $12$; $2$ books, $10$; $3$ books, $8$; $4$ books, $4$. How many students were surveyed?

  5. For the books data, find the mode.

  6. For the books data, find the relative frequency of $3$ books.

  7. For the books data, estimate the probability that a student read at least $2$ books.

  8. The relative frequencies in a table always:

  9. Exam style: the books survey was a random sample from a school of $900$ students. Estimate how many students in the school read no books last month.

  10. Exam style: a table has frequencies $4$, $k$, $8$ and $6$. The relative frequency of the second value is $0.25$. Find $k$.

Formula sheet