Notes on Data Display and Descriptive Statistics (Section 2.1)
Boundaries and Class Construction
- These are class boundaries that separate the classes without creating gaps between them.
- If we were concerned about a gap between two adjacent classes (e.g., 22 and 23), we could shift the boundaries by 0.5 on each side to avoid the gap.
- Example used in the talk: to avoid a gap between 22 and 23, use boundaries extended by 0.5 on each side:
- 17.5 to 22.5 for the first class
- 22.5 to 27.5 for the second class (the next class starts at 27.5, which still overlaps slightly at 27.5 if you’re not careful, but this convention is commonly used to avoid gaps)
- 27.5 to 32.5 for the third class
- The goal is to create boundaries without gaps so the entire range is covered.
- Note: In practice, many datasets are composed of whole numbers only, which often makes this adjustment less critical, but it’s a common technique when constructing histograms.
- The speaker notes that they haven’t encountered a case where the boundary refinement was strictly necessary.
- A frequency histogram is a pictorial representation of a frequency distribution.
- Example class labels used: 18–22, 23–27, 28–32, 33–37 (based on earlier dataset).
- Frequencies (heights of bars) correspond to how many observations fall in each class.
- For instance: 18–22 had 5 observations; 23–27 had 2; 28–32 had 6; 33–37 had some value (not explicitly stated in every line).
- The speaker notes that in a histogram the bars must touch each other (no gaps between bars) to distinguish it from a simple bar graph.
- When data do not perfectly fill consecutive classes, a small “jacket line” (a little break) is drawn to indicate that the original data skipped some values between classes.
- The histogram is a picture representation of the frequency distribution; more polished tools (e.g., Microsoft Excel) can produce cleaner visuals, but the concept remains the same.
- Midpoints are useful for polygon representations: the frequency polygon can be drawn by plotting points at the class midpoints and connecting them with lines.
- Relative frequency is the same idea but expressed as proportions (or decimals) rather than absolute counts:
- Example relative frequencies (from the speaker): 0.28,0.11,0.33,0.17,0.11.
- For clarity, a separate section discusses multiple classes (e.g., 3–4–5 classes) and how to represent them in a polygon or histogram.
Midpoints and Frequency Polygon
- For a frequency polygon, you plot frequencies (or relative frequencies) at the midpoint of each class and connect the dots with straight lines.
- The midpoint is a convenient representative value for each class (especially when using a line graph to show trends).
- You can create a frequency polygon from any dataset, but it often highlights trends more clearly when there is some apparent pattern across classes.
Relative Frequency
- Relative frequencies are the proportions of observations in each class, not the raw counts.
- The speaker reviews the relative frequencies corresponding to the data: 0.28,0.11,0.33,0.17,0.11.
- These should sum to 1 (or 100% when expressed as percentages).
Stem-and-Leaf Plots
- A stem-and-leaf plot uses the original data to sort and display distribution and makes outliers/extreme values easy to identify.
- Construction principles:
- Choose a stem convention (e.g., tens as the stem, units as the leaves). The speaker uses an example where the stems run from 1, 2, 3, 7, 8, etc., corresponding to decades (10s, 20s, 30s, etc.).
- A key is included to read the plot, e.g., 9 | 3 = 93, indicating the data value 93 (the exact convention depends on the data scale).
- Worked example (from the talk): a dataset starting with 14; leaves under stems 6 (63, 63, 68); under 7 (71, 72, 77, 79); under 8 (80, 81, 87); and 14 is represented by 1 | 4.
- Interpretation tips:
- The stem-and-leaf shows the actual data values (not just counts).
- It’s easy to spot outliers, e.g., a value far away from the clustering of other data.
- The key helps read and reconstruct the original dataset from the plot.
- The speaker notes a representative outlier, emphasizing the usefulness of stem-and-leaf plots for spotting extremes.
Dot Plots
- A dot plot (dot block) is a simple way to display a small dataset or a single variable.
- Example: number of paid streaming services per household.
- 0 services: 1 household (one dot above 0)
- 1 service: 2 households (two dots above 1)
- 2 services: 4 households (four dots above 2)
- 4 services: at least one or more households (dots above 4)
- The dots indicate the data values directly, and the height of each stack represents the frequency.
- The speaker uses this to illustrate how you can read the data from the dot plot and infer the underlying dataset.
Pie Chart and Nominal Data
- Pie charts are discussed in the context of nominal data, often used for frequencies across categories.
- The speaker notes that the bottom graph (in some paired charts) represents nominal data in a business context.
- Example discussion: inventory loss in a store is often due to theft, with employee theft highlighted as a major cause (the speaker’s anecdote about a grocery store).
- The key takeaway: pie charts can illustrate the share of categories (e.g., reasons for loss), while emphasizing that the data are often nominal.
Scatter Plots
- Scatter plots show paired data (two variables) and reveal relationships between them.
- Example discussed: Age vs. blood pressure.
- General pattern: blood pressure tends to rise with age, implying an upward trend, but variability exists (some older individuals with lower blood pressure and some younger individuals with higher blood pressure).
- Scatter plots are used to explore relationships and potential correlations.
Time Series
- Time series data track a variable over time and often show trends (growth or decay).
- The talk references a historical anchor: February 2008, when the first iPhone came out (smartphones started to exist then).
- 02/2008 marked a low point in the dataset they discussed; 02/2010 remained low; 02/2012 shows continued growth, reflecting early smartphone adoption and aging of earlier tech (e.g., flip phones).
- The takeaway: time series is a way to visualize changes over time and observe growth or decline trends.
- The three most common summary measures are the mean, median, and mode.
- Mean:
- Population mean: xˉ=Nextsumofallx=Next(sumofalldatavalues).
- Population size is denoted by N.
- The Greek letter for the population mean is μ (pronounced "mu").
- Sample mean:
- Sample mean is denoted by xˉ (with a bar over x) and is calculated as xˉ=nextsumofx where n is the sample size.
- The symbol xˉ signals a sample statistic, as opposed to μ for population.
- Population vs. sample notation recap:
- Population size: N
- Sample size: n
- Population mean: μ
- Sample mean: xˉ
- Example calculation (sample mean):
- Given data: 78,83,64,67,75,80,56
- Sum: 78+83+64+67+75+80+56=503
- Sample size: n=7
- xˉ=7503≈71.9.
- If rounding to one decimal place: xˉ≈71.9.
- The speaker notes that the approximate symbol ≈ is often used when rounding or presenting estimates.
- Median:
- To find the median, arrange the data in ascending order and select the middle value.
- If the sample size is odd, the middle value is the median.
- If the sample size is even, the median is the average of the two central values:
extmedian=2x<em>(n/2)+x</em>(n/2+1). - Example with two middle values (even n): if data are x<em>1≤x</em>2≤⋯≤x<em>n and n is even, median = 2x</em>n/2+xn/2+1.
- Mode:
- The value(s) that occur most frequently.
- If two values share the highest frequency, the distribution is bimodal (two modes).
- If all values are unique, there is no meaningful mode.
- The speaker notes that a temperature dataset might have no mode, illustrating a case with little to no repetition.
- Outliers:
- An outlier is an observation that is far removed from the rest of the data.
- The stem-and-leaf plot discussion highlights how outliers appear in that format as well.
Weighted Mean and GPA Example
- Weighted mean formula:
- xˉ<em>w=∑w</em>i∑x</em>iw<em>i where each data point $xi$ is weighted by $wi$.
- Example context: grade points and course hours (a practical GPA-style calculation):
- Letter grades mapped to points: A = 4, B = 3, C = 2, D = 1.
- Weights are the number of credit hours (course load) for each class.
- A: 3 credit hours, grade A (4 points) → contribution: 4×3=12.
- B: two 4-credit courses with grade B (3 points) → total weight for B is 8(4+4) and contribution: 3×8=24.
- C: one 3-credit course with grade C (2 points) → contribution: 2×3=6.
- D: one 2-credit course with grade D (1 point) → contribution: 1×2=2.
- Sum of weighted scores: 12+24+6+2=44.
- Total credits (sum of weights): 3+8+3+2=16.
- Weighted mean (GPA): xˉw=1644=2.75.
- Takeaway: the weighted mean generalizes the mean by giving each observation a weight; in coursework, this yields the GPA.
- Symmetric distribution:
- A roughly mirror-image around the center; the mean, median, and mode are all near the center (not required to be perfectly equal, but close).
- Uniform distribution (roughly):
- Data are spread more evenly around the center; the mean and median align with the center in a roughly flat or block-like shape; the mode is not meaningful if there are many values with equal frequency.
- Skewed distributions:
- Skewed left (tail to the left):
- The mean is pulled toward the tail (left side).
- The mode is at the tallest bar (the peak).
- The median lies to the left of the mean, closer to the tail.
- Skewed right (tail to the right):
- The mean is pulled toward the tail (right side).
- The mode remains at the peak.
- The median lies to the right of the mode, between the mode and mean.
- The speaker emphasizes the common misunderstandings about left vs. right skew and notes that the mean is the most affected by a tail, followed by the median, with the mode being the least affected by the tail.
- Practical implication: recognizing the shape helps interpret the relative positions of mean, median, and mode and choose appropriate summary statistics.
- Population mean: μ=N∑x
- Sample mean: xˉ=n∑x
- Population size: N; Sample size: n
- Median for odd n: middle value; for even n: median=2x<em>(n/2)+x</em>(n/2+1)
- Mode: most frequent value(s); bimodal means two modes
- Relative frequency: proportions that sum to 1 (or 100%) across classes
- Histogram rules:
- Bars in a histogram must touch; otherwise, it is a bar graph, not a histogram
- When gaps exist in the data, a small notch or line may indicate the skipped range
- Stem-and-leaf key example: 9 | 3 = 93 indicates a data value of 93; stems typically show the leading digits and leaves show the trailing digits
- Weighted mean: xˉ<em>w=∑w</em>i∑x</em>iw<em>i
- Example of GPA-like calculation: weights correspond to course credits; x_i are grade-point values per course; total credits are the sum of weights; GPA is the weighted mean of grades
- Approximation symbol: ≈ used when rounding or presenting estimates
Practical Tips and Common Pitfalls
- When presenting class boundaries, be explicit about whether you include endpoints and how you avoid gaps (e.g., using half-unit adjustments such as 17.5–22.5, 22.5–27.5, 27.5–32.5).
- Always distinguish between population and sample notation/quantities (mu, N vs. x-bar, n).
- When describing distributions, note the skew direction and how it affects the location of mean, median, and mode.
- In small datasets, the mode may be undefined or multiple (bimodal); interpret with care.
- Use stems-and-leaves for quick, readable data summaries and to identify outliers; always include a clear key so the data can be reconstructed.
- For time-series discussions, tie the timeline to real events (e.g., technology introductions) to understand why a trend may emerge.
- In empirical examples (like GPA), show the calculation steps clearly, including the weighted sum and the total of weights, to reinforce the concept of weighted means.
- Remember that the mean is sensitive to extreme values; the median provides a robust central tendency when outliers are present.
End of Section 2.1 Review
- The lecture moves from data display and organization (histograms, stem-and-leaf, dot plots, pie charts, scatter plots, time series) to descriptive statistics (mean, median, mode, outliers) and then to weighted means and distribution shapes.
- The key ideas to remember for the exam: how to construct and read different plots, how to compute and interpret mean/median/mode, how to distinguish population vs. sample notation, how to compute a weighted mean, and how distribution shape informs the relationships among mean, median, and mode.