Module 2 - Reading. Descriptive Statistics: Frequency Distributions, Measures of Location, Variability, Distribution Analysis, and Association
Relative Frequency and Percent Frequency Distributions
Frequency distributions summarize categorical or quantitative data by showing the number (frequency) of items in each of several non-overlapping bins.
Relative frequency represents the fraction or proportion of total items belonging to a specific bin.
The formula for calculating relative frequency is:
where equals the total number of observations in the dataset.
Relative frequency distribution is a tabular summary of data displaying the relative frequency for each bin.
Percent frequency distribution is a tabular summary showing the percent frequency for each bin, computed by multiplying the relative frequency by .
Soft Drink Purchases Example ( observations):
Coca Cola: Frequency = , Relative Frequency = , Percent Frequency =
Diet Coke: Frequency = , Relative Frequency = , Percent Frequency =
Doctor Pepper: Frequency = , Relative Frequency = , Percent Frequency =
Pepsi: Frequency = , Relative Frequency = , Percent Frequency =
Sprite: Frequency = , Relative Frequency = , Percent Frequency =
Total Relative Frequency = , Total Percent Frequency =
Top 3 Soft Drinks Combined: Coca Cola (38\%$) + Pepsi (26\%$) + Diet Coke (16\%$) = 80\% of all purchases.\n- Estimating Probability Distributions:\n - A percent frequency distribution derived from observations of a random variable provides empirical estimates of the relative likelihoods of different outcomes.\n - Example application: A concession stand manager at an upcoming concert can use soft drink historical percent frequency distributions to estimate future demand probabilities and accurately order supply volumes.\n\n# Constructing Frequency Distributions for Quantitative Data\n\n- Defining Non-Overlapping Bins:\n - Quantitative data require careful specification of non-overlapping bins so that each observation falls into exactly one bin.\n- Actuarial Case Study (n = 700 individual ages at death from file `Agedith`):\n - Data values range from 0109 years.\n- Three Steps to Define Bins for Quantitative Data:\n 1. Determine the Number of Non-Overlapping Bins:\n - General guideline: Select between 520 bins.\n - Using too many bins results in bins with very few observations, obscuring generalizable patterns.\n - Using too few bins aggregates data across too wide a range, failing to capture actual variation.\n - Selecting bin count is subjective and depends on sample size and objective. For n = 70016 bins are selected.\n 2. Determine the Width of Each Bin:\n - General guideline: Keep bin width identical for every bin.\n - Bin width and bin count are inversely related.\n - Equation for approximate bin width:\n\n\text{Approximate Bin Width} = \frac{\text{Largest Data Value} - \text{Smallest Data Value}}{\text{Number of Bins}}\n\n - Calculation for age data:\n\n\text{Approximate Bin Width} = \frac{109 - 0}{16} = 6.8125\n\n - Round up to a convenient value: Bin width of 7\,\text{years}167109\,\text{years}.\n 3. Determine the Range Spanned by the Bins:\n - Range spanned by 16716 \times 7 = 112\,\text{years}.\n - Since data range is 109\,\text{years}3\,\text{years}.\n - Four possible starting values for the lower limit of the first bin yield valid sets: [-3, 4][-2, 5][-1, 6][0, 7].\n - Choosing 0\,\text{years}[0, 7].\n- Bin Limit Notation and Inclusivity Rules:\n - First bin [0, 7]070 \le x \le 70, 0, 0, 0, 0, 1, 57).\n - Second bin (7, 14]7x > 714x \le 14101).\n - Standard Rule: First bin includes both limits; all subsequent bins exclude lower limit and include upper limit. This guarantees non-overlapping bins.\n - Bin Sequence: [0, 7](7, 14](14, 21](21, 28](28, 35](35, 42](42, 49](49, 56](56, 63](63, 70](70, 77](77, 84](84, 91](91, 98](98, 105](105, 112]112+.\n - Overflow Bin 112+112\,\text{years}. Used for large datasets or handling extreme outliers.\n- Complete Age at Death Distribution (n = 700):\n - [0, 7]70.0101.0\%\n - (7, 14]10.0010.1\%\n - (14, 21]60.0090.9\%\n - (21, 28]70.0101.0\%\n - (28, 35]100.0141.4\%\n - (35, 42]150.0212.1\%\n - (42, 49]160.0232.3\%\n - (49, 56]360.0515.1\%\n - (56, 63]560.0808.0\%\n - (63, 70]700.10010.0\%\n - (70, 77]1150.16416.4\%\n - (77, 84]1480.21121.1\%\n - (84, 91]1420.20320.3\%\n - (91, 98]580.0838.3\%\n - (98, 105]30.0040.4\%\n - (105, 112]20.0030.3\%109, 109)\n - 112+00.0000.0\%\n - Total: Frequency = 7001.000100.0\%\n- Primary Findings:\n - Most common age at death: (77, 84]14821.1\%).\n - Only 71.0\%$) died at age .
Zero individuals lived beyond .
Excel Implementation via
FREQUENCYFunction:Column
Ccontains lower limits, ColumnDcontains upper limits (D2:D17).Range
A2:A701contains raw age data.Enter formula
=FREQUENCY(A2:A701, D2:D17)in cellE2to populate bin frequencies inE2:E18.Legacy Excel method: Highlight cells
E2:E17, type formula, pressCTRL + SHIFT + ENTER(array formula).
Histograms, Frequency Polygons, and Distribution Shapes
Histograms:
A graphical display of quantitative data constructed from frequency, relative frequency, or percent frequency distributions.
Formed by adjacent columns with zero gap width between them to display variable continuity.
Creating Automatic Histograms in Excel:
Select data range
A1:A701.Click
Inserttab on ribbon.Click
Insert Statistic Chartbutton in Charts group SelectHistogram.
Excel automatically generates bins of width . Tallest bar corresponds to .
Creating Manual Histograms in Excel (Custom Control):
Uses
FREQUENCYfunction andCONCAT(orCONCATENATEin older Excel versions) for axis labels.
Select cells
D2:E17.Click
InserttabInsert Column or Bar ChartSelectClustered Column.Right-click chart
Change Chart TypeSelect single variable clustered column.Right-click data series column
Format Data SeriesSetGap WidthtoRight-click chart
Select DataUnder Horizontal Category Axis Labels clickEditEnter=Data!$F$2:$F$17Click OK.
Bin Parameter Sensitivity ( subset in
Agedith30):bins (width ): Indicates oldest bin is most likely.
bins (width ): Indicates second-oldest bin is most likely; oldest is third most likely.
bins (width ): Indicates oldest bin is most likely.
Explanation: out of observations equal exactly , making visual shape highly sensitive to bin boundary placement.
Distribution Shape and Skewness:
Skewness reflects lack of symmetry in a distribution.
Left-Skewed Distribution: Left tail extends farther than right tail (e.g., age at death, exam scores where most scores exceed and none exceed ).
Right-Skewed Distribution: Right tail extends farther than left tail.
Symmetric Distribution: Left and right sides are mirror images.
Frequency Polygons:
Uses continuous line segments connecting bin frequency counts rather than column bars.
Superior tool for comparing distributions across multiple groups without cluttering.
Requires relative frequency distributions when sample sizes differ (, in
AgedithSex).
Excel Formulas for Comparative Polygons:
Total females in
F3: `=COUNTIF(B2:B701,