The University of Manchester · FACULTY OF COMPUTER SCIENCE

SOST10031 Chap.4 Exploratory Data Analysis

- one subject, every graph, every model, every mark
8 Chapters5-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 4 of 10 · SOST10031

Exploratory Data Analysis

Exploratory Data Analysis is the week in which you learn to look at a dataset before deciding what it shows. The work begins by naming what one row represents and sorting each variable into a type, because the type points to a sensible first display: bars for categories, histograms for a single numerical variable, boxplots for comparing groups and scatterplots for two measurements together.

A distribution is then described under four headings rather than through one average: where its centre lies, how widely it spreads, what shape it takes and which values stand apart. The chapter spends time on the contrast between mean and median, since a single extreme observation can move the first a long way while leaving the second almost untouched.

It also builds a boxplot by hand from a stated quartile rule so the box, whiskers and outlier points stop being decoration. Throughout, descriptive language stays descriptive: a scatterplot can reveal that two measures move together across cases, yet it cannot by itself say why, so association and causation are kept firmly apart.

In this chapter

What this chapter covers

  • 01

    What one row represents in a dataset

  • 02

    Categorical variables, counts and measurements

  • 03

    Matching a question to a first display

  • 04

    Centre, spread, shape and unusual values

  • 05

    How the mean and the median respond to an extreme value

  • 06

    Building and reading a boxplot

  • 07

    Histogram bin width and the detail it reveals

  • 08

    Describing association without claiming causation

Worked example · free

Find the mean and median when one value is extreme

Q [5 marks]. Seven invented students report weekly practice hours of 2, 3, 3, 4, 5, 5 and 20. Calculate the mean and the median, then explain which better describes a typical student and what happens to both if the 20 is removed. The weighting across steps is a self-assessment guide from AskSia and is not official.
Each dot is one invented student and the horizontal axis counts weekly practice hours; notice that the single value of 20 drags the mean to 6 while the median sEach dot is one invented student and the horizontal axis counts weekly practice hours; notice that the single value of 20 drags the mean to 6 while the median stays at 4. median 4 mean 6 extreme value 20 05101520 weekly practice hours
Each dot is one invented student and the horizontal axis counts weekly practice hours; notice that the single value of 20 drags the mean to 6 while the median stays at 4.
  • 1Add the seven values to get 42 and divide by 7, giving a mean of 6 hours.
  • 1Sort the values and take the fourth of seven, giving a median of 4 hours.
  • 2Only one student exceeds five hours, so the median of 4 sits among the typical values, whereas the mean of 6 is lifted by that single 20.
  • 1Dropping the 20 leaves a total of 22 across six students: the mean becomes about 3.67 and the median 3.5, so the mean shifted far more than the median.
The mean is 6 hours and the median is 4 hours. The median better represents a typical student because one extreme value raises the mean; removing that value drops the mean to about 3.67 but the median only to 3.5.
Sia tip — Sort the values before averaging; if the mean lies outside the cluster where most values sit, report the median next to it.
Glossary

Key terms

Exploratory data analysis
The first inspection of a dataset using summaries and charts to understand its contents, notice patterns and find questions worth investigating.
Median
The middle value of a sorted set of observations, or the average of the two middle values when the count is even.
Interquartile range
The distance between the upper and lower quartiles, covering the middle half of the values.
Boxplot
A chart that shows the median, the quartiles, the whiskers and any outlying values of a numerical variable.
FAQ

Exploratory Data Analysis FAQ

Should I report the mean or the median?

Report the summary that represents the typical case and say why you chose it. When a distribution is skewed or contains a very large value, the median usually describes most observations better, while the mean is pulled toward the tail. Quoting both lets a reader see the effect of that tail directly.

What is the difference between a bar chart and a histogram?

Bars show separate categories, so they stand apart with gaps. A histogram cuts one continuous numerical scale into adjacent intervals, so its bars touch. Changing the interval width in a histogram changes the detail you can see, which is why the chosen width should be stated.

Does a scatterplot show that one variable causes another?

No. It shows whether two measurements tend to move together across the cases plotted, such as countries or car models. A causal explanation needs a different kind of evidence, so describe direction and strength of the association and keep causal verbs out of titles and sentences.

Study strategy

Assessment move

Work through the week with a pencil before opening R. Take any small set of values, sort it, find the median and quartiles using one stated rule, compute the mean, and only then compare your numbers with the output of the supplied code. Practise saying what a single row represents for every dataset you meet, including the fuel economy practice data and the country-level teaching files.

For each chart in the notebook, write one sentence that uses all four description headings: centre, spread, shape and unusual values. Change the histogram bin width in the supplied example two or three times and note what appears or disappears. Rewrite at least one chart title so that it reports what the axes show without implying cause.

Finally, connect the work to your formative plan by naming one table or chart that could address your question and one check you would run before trusting it.

Working through Exploratory Data Analysis in SOST10031? Sia is AskSia’s AI Computer Science tutor — ask any SOST10031 Exploratory Data Analysis question and get a clear, step-by-step explanation grounded in how SOST10031 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 41 of your subjects at The University of Manchester, plus 1,000+ more Bibles across the AskSia library.
Sia - your SOST10031 tutor, unlimited, worked the way the exam marks it
The full 5-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works