Understanding Data
Collecting, Storing and Processing Data
- Data collection means identifying the sources that can supply the data a question needs and gathering it — through forms and surveys, sensors and instruments, transactions recorded by a system, or data already published by organisations and government portals.
- Data storage keeps the collected data for later use, as files or in databases, on devices such as hard disk drives, solid state drives, CDs and DVDs, pen drives and memory cards, or on remote servers in the cloud.
- Data processing turns data into information through a cycle of input → process → output: data is entered, then classified, sorted, calculated or summarised, and the results are presented — an examination board turning answer-sheet marks into results is one such cycle.
- Data collectionForms, surveys, sensors, transactions
- Data storageFiles or databases; devices or cloud
- Input: data is entered
- Process: classify, sort, calculate
- Output: results presented
- Informatione.g. marks turned into results
Data collection means identifying the sources that can supply the data a question needs and gathering it — through forms and surveys, sensors and instruments, transactions recorded by a…
Measures of Central Tendency: Mean, Median, Mode
A measure of central tendency is a single value that represents the centre of a set of data. The mean (arithmetic average) is the sum of the values divided by their number. The median is the middle value once the data is arranged in order; with an even number of values it is the average of the two middle ones. The mode is the value that occurs most often. Take 4, 8, 6, 5, 3, 8, 9: the sum is 43 over 7 values, so the mean is about 6.14; sorted, the data is 3, 4, 5, 6, 8, 8, 9 and the median is the fourth value, 6; 8 appears twice and every other value once, so the mode is 8.
A measure of central tendency is a single value that represents the centre of a set of data. The mean (arithmetic average) is the sum of the values divided by their number. The median is…
Measures of Variability: Range and Standard Deviation
Two classes can have the same mean and very different marks — one with everyone near the average, the other split between very high and very low scores. A measure of variability (dispersion) describes that spread. The range is the simplest: largest value minus smallest. For 15, 22, 9, 30, 18 it is 30 − 9 = 21. It uses only two values, so a single outlier changes it completely.
The standard deviation (σ) uses every value. Find the mean x̄; subtract it from each value to get its deviation; square each deviation; take the mean of the squares; and take the square root: σ = √( Σ(x − x̄)² / n ). For 2, 4, 4, 4, 5, 5, 7, 9 the mean is 40 / 8 = 5; the deviations are −3, −1, −1, −1, 0, 0, 2, 4; their squares add to 9 + 1 + 1 + 1 + 0 + 0 + 4 + 16 = 32; 32 / 8 = 4; and σ = √4 = 2. A small standard deviation means the values cluster close to the mean; a large one means they are widely spread.
- Mean x̄ = 40 / 8 = 5Data: 2, 4, 4, 4, 5, 5, 7, 9
- Deviations: −3, −1, −1, −1, 0, 0, 2, 4
- Squares add to 32
- Mean of squares: 32 / 8 = 4
- σ = √4 = 2
Two classes can have the same mean and very different marks — one with everyone near the average, the other split between very high and very low scores. A measure of variability…
Worked Example: Every Measure on One Data Set
Take the data 2, 4, 4, 4, 5, 5, 7, 9. The mean is 40 / 8 = 5. Arranged in order, the middle two values are 4 and 5, so the median is 4.5. The value 4 appears most often, so the mode is 4. The range is 9 − 2 = 7. The deviations from the mean are −3, −1, −1, −1, 0, 0, 2, 4, with squares 9, 1, 1, 1, 0, 0, 4, 16 adding to 32. The population variance is 32 / 8 = 4, so the standard deviation is 2; dividing by n − 1 = 7 instead, as for a sample, gives about 2.14. Now add one extreme value, 100: the mean jumps to about 15.6 while the median only moves to 5, which is the reason the median is preferred for skewed data such as incomes.
| Measure | Working | Value |
|---|---|---|
| Mean | 40 / 8 | 5 |
| Median | (4 + 5) / 2 | 4.5 |
| Mode | most frequent | 4 |
| Range | 9 − 2 | 7 |
| Standard deviation | √(32 / 8) | 2 |
Take the data 2, 4, 4, 4, 5, 5, 7, 9. The mean is 40 / 8 = 5. Arranged in order, the middle two values are 4 and 5, so the median is 4.5. The value 4 appears most often, so the mode is 4.…
Key takeaways
- Data is raw facts; processed to answer a question, it becomes information.
- Structured data sits in rows and columns; images, audio, video and e-mail are unstructured.
- Processing follows input → process → output; data is stored in files or databases on disks, drives or the cloud.
- Mean is the average, median the middle value after sorting (average of two middles if the count is even), mode the most frequent value.
- An outlier pulls the mean far more than the median.
- Range = largest − smallest; standard deviation = √(Σ(x − x̄)² / n); adding a constant to every value changes neither.
Practice questions (27)
Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.
For the data 4, 8, 6, 5, 3, 8, 9, what are the median and the mode?
Show answer
Answer: A — Median 6, mode 8
Sorted, the seven values are 3, 4, 5, 6, 8, 8, 9, so the median is the fourth, 6; 8 occurs twice and every other value once, so the mode is 8. Median 5 is the middle of the data as written, before sorting. Mode 9 picks the largest value instead of the most frequent, and median 8 with mode 6 swaps the two measures.What is the standard deviation of 2, 4, 4, 4, 5, 5, 7, 9, taking σ = √(Σ(x − x̄)² / n)?
Show answer
Answer: D — 2
The mean is 40 / 8 = 5; the squared deviations are 9, 1, 1, 1, 0, 0, 4 and 16, adding to 32; dividing by 8 gives 4, and the square root is 2. Answering 4 stops one step early, giving the mean of the squared deviations rather than its root. 5 is the mean itself, and 7 is the range, 9 − 2, a different measure of spread.What is the median of the values 12, 7, 3, 9?
Show answer
Answer: C — 8
Sorted, the values are 3, 7, 9, 12; with an even count the median is the average of the two middle values, (7 + 9) / 2 = 8. Five is the average of 7 and 3, the middle pair before sorting. 7.75 is the mean, 31 / 4, and 9 picks just one of the middle pair instead of averaging them.
Show the other 24 questions
Which of the following is an example of unstructured data?
Show answer
Answer: B — Video recordings of classroom lectures
A video has no predefined rows and columns that a program can search directly, which is what makes it unstructured. The marks table, the timetable and the bank statement are all organised into fixed fields — the defining feature of structured data — even though they look very different from one another.The data 10, 12, 14, 16, 98 contains one extreme value. Which statement is correct?
Show answer
Answer: A — The mean (30) is pulled far above most values, while the median (14) is not
The sum is 150, so the mean is 30, larger than four of the five values, because every value — including 98 — enters the average. The median is the middle value after sorting, 14, and would be the same if 98 were 20. Claiming the median is pulled while the mean is not reverses the two measures' sensitivity, and an outlier never prevents either from being calculated.What is the range of the data 15, 22, 9, 30, 18?
Show answer
Answer: D — 21
The range is the largest value minus the smallest: 30 − 9 = 21. 15 is the difference between the first and last values as written, which ignores where the extremes actually are. 18.8 is the mean, 94 / 5, a measure of centre rather than spread, and 3 is not any measure of this data.Assertion (A): If 5 is added to every value in a data set, its standard deviation does not change. Reason (R): Adding the same constant to every value leaves the mean of the data unchanged.
Show answer
Answer: C — A is true, but R is false
Adding 5 to every value raises the mean by 5 as well, so each deviation x − x̄ is exactly what it was and the standard deviation is unchanged: A is true. R is false — the mean does change, by 5. It is precisely because the mean moves along with the data that the deviations stay the same, so a candidate who thinks the mean stays fixed has the right conclusion for the wrong reason.Which of the following is a measure of variability (spread) rather than of central tendency?
Show answer
Answer: C — Standard deviation
Standard deviation measures how far the values lie from the mean, which is a description of spread; range is the other spread measure in the syllabus. Mean, median and mode each give a single value representing the centre of the data — two classes can share all three and still differ completely in how spread out their marks are.Ten students average 60 marks and twenty students average 75 marks. The mean of all thirty students is ____.
Numerical answer — type the value.
Show answer
Answer: 70
Total marks = 600 + 1,500 = 2,100, and 2,100/30 = 70. Second route: weights 1/3 and 2/3 give 20 + 50 = 70. Averaging 60 and 75 to get 67.5 ignores the group sizes and is the tempting wrong answer.The data 2, 4, 4, 4, 5, 5, 7, 9 is only a sample, so the standard deviation is found by dividing by n - 1. To two decimal places it is ____.
Numerical answer — type the value.
Show answer
Answer: 2.14
The sum of squared deviations is 32 and n - 1 = 7, so SD = sqrt(32/7) = sqrt(4.571) = 2.14. Check: 2.14 squared is 4.58. Dividing by 8 gives the population value 2, the tempting wrong answer here.Every value of the data 2, 4, 4, 4, 5, 5, 7, 9 is multiplied by 3. The new standard deviation (population form, original value 2) is ____.
Numerical answer — type the value.
Show answer
Answer: 6
Each deviation is multiplied by 3, so the squared deviations are multiplied by 9 and the square root by 3: SD = 6. Check directly: the new data 6, 12, 12, 12, 15, 15, 21, 27 has mean 15 and squared deviations summing to 288, so sqrt(288/8) = 6. Adding 3 instead of multiplying would leave SD at 2, the tempting wrong answer.What are the mean and the median of 2, 4, 6, 10?
Show answer
Answer: A — Mean 5.5, median 5
The sum is 22, so the mean is 5.5; the middle two values are 4 and 6, so the median is 5. The second option swaps the two measures, which is the tempting error.The arithmetic mean of a set of values is:
Show answer
Answer: A — The sum of the values divided by their number
Mean is the sum divided by the count. The middle value is the median, the most frequent is the mode and the largest minus smallest is the range.The value that occurs most often in a data set is called the:
Show answer
Answer: A — Mode
The mode is the most frequent value. The median is the middle value of the ordered data.The range of the data 6, 11, 3, 20, 9 is:
Show answer
Answer: A — 17
Range = maximum − minimum = 20 − 3 = 17. 20 is only the maximum and 49 is the sum.Which of the following is a measure of the spread of data?
Show answer
Answer: A — Standard deviation
Standard deviation tells how far values lie from the mean. Mean, mode and median are measures of central tendency.What is the output of the following code?
import statistics as std = [3, 5, 5, 7, 10]print(st.mean(d), st.median(d), st.mode(d))Show answer
Answer: B — 6 5 5
The sum is 30 so the mean is 6, the middle value is 5 and the most frequent is 5: 6 5 5. "5 5 5" takes the mean as 5, and "6 7 5" mixes up the middle value.What is the output of the following code?
import statistics as stprint(st.pstdev([2, 4, 4, 4, 5, 5, 7, 9]))Show answer
Answer: B — 2.0
The mean is 5 and the squared deviations average 4, so the population standard deviation is 2.0. 4.0 is the variance, not its square root.Gender recorded as male or female is an example of:
Show answer
Answer: A — Nominal (categorical) data
Gender names categories with no order, so it is nominal. Heights or temperatures are continuous or interval data.Assertion (A): The median is less affected by extreme values than the mean.
Reason (R): The median depends only on the middle position of the ordered data, not on how large the extreme values are.
Choose the correct option:Show answer
Answer: A — Both A and R are true and R is the correct explanation of A
The extremes change the sum but not the middle position, which R states. Option 2 is wrong.Consider the following statements:
A. The mean is affected by outliers.
B. Standard deviation measures the spread of data about the mean.
C. The mode of a data set is always unique.
D. The range uses only the largest and smallest values.
Choose the correct answer:Show answer
Answer: A — A, B and D only
A, B and D are correct. C is false because a set can have more than one mode, so option 4 is the trap.The median of the values 12, 7, 3, 9, 5 is:
Show answer
Answer: A — 7
Sorted, the values are 3, 5, 7, 9, 12 and the middle one is 7. 7.2 is the mean, not the median.What is the output of the following code?
import statistics as std = [10, 20, 30, 40, 1000]print(st.mean(d), st.median(d))Show answer
Answer: A — 220 30
The outlier 1000 pulls the mean to 220, whereas the median remains the middle value 30: 220 30. "30 220" swaps the two measures.What is the output of the following code?
import statistics as sta = [1, 2, 3, 4, 5]b = [x * 2 + 10 for x in a]print(st.mean(b), st.pstdev(b) / st.pstdev(a))Show answer
Answer: B — 16 2.0
Doubling and adding 10 turns the mean 3 into 16, and the spread doubles while adding a constant does not change it: 16 2.0. "16 1.0" forgets that scaling changes the standard deviation.Assertion (A): Adding the same constant to every value leaves the standard deviation unchanged.
Reason (R): Every value moves by the same amount, so the distances between values and the mean stay the same.
Choose the correct option:Show answer
Answer: A — Both A and R are true and R is the correct explanation of A
The shift moves the mean along with the values, so deviations are the same, as R states. Option 2 is wrong.What is the output of the following code?
import statistics as stprint(st.multimode([1, 2, 2, 3, 3, 4]))Show answer
Answer: B — [2, 3]
Both 2 and 3 occur twice, so there are two modes: [2, 3]. "[2]" and "[3]" list only one of them.What is the output of the following code?
v = [60, 80]w = [1, 3]print(sum(a * b for a, b in zip(v, w)) / sum(w))Show answer
Answer: B — 75.0
The weighted mean is (60×1 + 80×3) ÷ 4 = 300 ÷ 4 = 75.0. 70.0 is the simple mean, which ignores the weights.