SQA Advanced Higher Statistics
35 notatek do nauki, utworzonych przez cookie, w 3 sekcjach zgodnych z tematami kursu.
Notes for SQA Advanced Higher Statistics (C803 77), in folders for the course's three areas, data analysis and modelling, statistical inference and hypothesis testing, with one note per sub-topic in the specification's order. Each note has definitions, methods and worked examples. Delete any folder you do not need once the notes are yours.
Co zawiera
Pierwsza notatka
Data analysis and modelling / Exploratory data analysis of univariate data
Exploratory data analysis (EDA) is the first look at a set of data before any model is chosen. The aim is to see the shape of the data, its centre and spread, and any values that do not fit the pattern, so that later assumptions are reasonable.
Discrete and continuous data
A discrete variable takes values that can be counted, usually whole numbers, such as the number of goals scored in a match or the number of faulty bulbs in a box. A continuous variable can take any value in an interval and is measured, such as height, mass or time. The distinction matters because it decides which distributions can model the data. A Poisson or binomial model suits counts, and a normal model is often used for measurements.
Data are also collected in different ways. A survey, an experiment and a set of records from a machine can all give numbers, but they do not carry the same guarantees about how representative they are. EDA says nothing about whether the sample was chosen well; that depends on how the sample was drawn. What EDA can show is whether the sample looks like a sensible picture of the population it came from.
Displays for a single variable
A dot plot places one dot above a number line for each observation, so repeated values stack up. It works well for small sets of discrete data.
A stem-and-leaf diagram keeps the actual values while showing the shape. For the data 14, 17, 17, 21, 23, 23, 23, 28, the stems are the tens digits and the leaves are the units:
| Stem | Leaves |
|---|---|
| 1 | 4 7 7 |
| 2 | 1 3 3 3 8 |
A key such as "1 | 4 means 14" must go with the diagram. Leaves are written in order, so the diagram can be read to find the median and quartiles directly.
Summary measures
For a data set x1,x2,…,xn, the sample mean is
The median is the middle value when the data are in order. For an even number of values it is the average of the two middle values. The quartiles divide the ordered data into four equal parts. The lower quartile Q1 is the median of the lower half of the data and the upper quartile Q3 is the median of the upper half. Some textbooks include the median in both halves when n is odd; it is left out of both halves here. Any consistent method gives the same conclusions in practice.
The interquartile range is IQR=Q3−Q1. It measures the spread of the middle half of the data and is not affected by a few extreme values.
Worked example
The twelve values 4, 6, 7, 9, 10, 11, 12, 12, 14, 15, 18, 31 are in order. The median is the average of the sixth and seventh values, (11+12)/2=11.5. The lower half is 4, 6, 7, 9, 10, 11, with median (7+9)/2=8, so Q1=8. The upper half is 12, 12, 14, 15, 18, 31, with median (14+15)/2=14.5, so Q3=14.5. Then
The mean is 149/12=12.42 to two decimal places, which is pulled upwards by the value 31. The median is 11.5, and the gap between the mean and the median is a sign that one value sits far from the rest.
The sample standard deviation divides by n−1 and is
For this set s=7.05 to two decimal places. The divisor n−1 is explained in the section on estimators in statistical inference.
Box plots and outliers
A box plot draws a box from Q1 to Q3, a line at the median, and whiskers out to the most extreme values that are not outliers. Values beyond the fences are marked separately as possible outliers. The fences are
The factor 1.5 is a common convention, not a law. A value beyond a fence is a possible outlier, meaning it is worth checking, not that it must be removed.
In the example above, the fences are 8−1.5×6.5=−1.75 and 14.5+1.5×6.5=24.25. The value 31 lies beyond the upper fence, so it is a possible outlier. Nothing lies below the lower fence, and the only other value that might be questioned is the 4, which is well inside the fence.
Once a possible outlier is found, the response is a judgement, and it should be stated. A value that is a recording error can be corrected or removed, and the analysis should say so. A value that is genuine is kept, because removing it would make the data look more regular than they are. Either way, the conclusions should be given with and without the value where the decision matters.
Shape of the distribution
Two data sets can have the same mean and median and still look different. A histogram or a stem-and-leaf diagram shows whether the values pile up in the middle, spread evenly or cluster at one end. Describe the shape as symmetrical or non-symmetrical. A symmetrical distribution has its two halves as mirror images about the centre. Symmetry is not the same as normality: a normal distribution must be symmetrical, but a symmetrical distribution need not be normal, and a flat or bimodal set can be symmetrical without being bell-shaped. Describing the shape in words, such as "more values sit at the top end, with a long tail of low values", says the same thing more plainly.
Choosing a model after EDA
EDA is used to decide what to assume. A roughly symmetrical, bell-shaped set with no outliers suggests a normal model may fit. A set of whole-number counts that are spread out and have a mean close to their variance suggests a Poisson model. A set of two outcomes repeated a fixed number of times suggests a binomial model. These are suggestions to test, and the chi-squared goodness-of-fit test is the formal check that a chosen distribution fits the data.
When EDA shows an outlier that cannot be explained, the normal model may be a poor choice, and a method that does not assume normality is more appropriate. The Wilcoxon signed-rank and Mann-Whitney tests are the rank-based methods for that situation.
I jeszcze 34: otwórz dowolne z nich z powyższej listy.
Opinie
Nie ma jeszcze pisemnych opinii. Dodaj te notatki do swoich, a możesz być pierwszą osobą, która doda opinię.