SOST10031 Chap.4 Exploratory Data Analysis
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.
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
- 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.
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.
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.
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.