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:

Relative Frequency of a Bin=Frequency of the Binn\text{Relative Frequency of a Bin} = \frac{\text{Frequency of the Bin}}{n}

  where nn 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 100%100\%.

  • Soft Drink Purchases Example (n=50n = 50 observations):

    • Coca Cola: Frequency = 1919, Relative Frequency = 1950=0.38\frac{19}{50} = 0.38, Percent Frequency = 38%38\%

    • Diet Coke: Frequency = 88, Relative Frequency = 850=0.16\frac{8}{50} = 0.16, Percent Frequency = 16%16\%

    • Doctor Pepper: Frequency = 55, Relative Frequency = 550=0.10\frac{5}{50} = 0.10, Percent Frequency = 10%10\%

    • Pepsi: Frequency = 1313, Relative Frequency = 1350=0.26\frac{13}{50} = 0.26, Percent Frequency = 26%26\%

    • Sprite: Frequency = 55, Relative Frequency = 550=0.10\frac{5}{50} = 0.10, Percent Frequency = 10%10\%

    • Total Relative Frequency = 1.001.00, Total Percent Frequency = 100%100\%

    • 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 0toto109 years.\n- Three Steps to Define Bins for Quantitative Data:\n 1. Determine the Number of Non-Overlapping Bins:\n - General guideline: Select between 5andand20 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 = 700,,16 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}.Roundingupensures. Rounding up ensures16binsofwidthbins of width7coverthefullrangeofcover the full range of109\,\text{years}.\n 3. Determine the Range Spanned by the Bins:\n - Range spanned by 16binsofwidthbins of width7equalsequals16 \times 7 = 112\,\text{years}.\n - Since data range is 109\,\text{years},thespanningrangeexceedsdatarangeby, the spanning range exceeds data range by3\,\text{years}.\n - Four possible starting values for the lower limit of the first bin yield valid sets: [-3, 4],,[-2, 5],,[-1, 6],or, or[0, 7].\n - Choosing 0\,\text{years}aslowerlimitgivesthefirstbinas lower limit gives the first bin[0, 7].\n- Bin Limit Notation and Inclusivity Rules:\n - First bin [0, 7]:Inclusiveofbothlowerlimit: Inclusive of both lower limit0andupperlimitand upper limit7((0 \le x \le 7).Sortedvaluesindataset:). Sorted values in dataset:0, 0, 0, 0, 0, 1, 5(Frequency=(Frequency =7).\n - Second bin (7, 14]:Excludeslowerlimit: Excludes lower limit7((x > 7)andincludesupperlimit) and includes upper limit14((x \le 14).Valueindataset:). Value in dataset:10(Frequency=(Frequency =1).\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+:Containsallvaluesstrictlygreaterthan: Contains all values strictly greater than112\,\text{years}. Used for large datasets or handling extreme outliers.\n- Complete Age at Death Distribution (n = 700):\n - [0, 7]:Frequency=: Frequency =7,RelativeFrequency=, Relative Frequency =0.010,PercentFrequency=, Percent Frequency =1.0\%\n - (7, 14]:Frequency=: Frequency =1,RelativeFrequency=, Relative Frequency =0.001,PercentFrequency=, Percent Frequency =0.1\%\n - (14, 21]:Frequency=: Frequency =6,RelativeFrequency=, Relative Frequency =0.009,PercentFrequency=, Percent Frequency =0.9\%\n - (21, 28]:Frequency=: Frequency =7,RelativeFrequency=, Relative Frequency =0.010,PercentFrequency=, Percent Frequency =1.0\%\n - (28, 35]:Frequency=: Frequency =10,RelativeFrequency=, Relative Frequency =0.014,PercentFrequency=, Percent Frequency =1.4\%\n - (35, 42]:Frequency=: Frequency =15,RelativeFrequency=, Relative Frequency =0.021,PercentFrequency=, Percent Frequency =2.1\%\n - (42, 49]:Frequency=: Frequency =16,RelativeFrequency=, Relative Frequency =0.023,PercentFrequency=, Percent Frequency =2.3\%\n - (49, 56]:Frequency=: Frequency =36,RelativeFrequency=, Relative Frequency =0.051,PercentFrequency=, Percent Frequency =5.1\%\n - (56, 63]:Frequency=: Frequency =56,RelativeFrequency=, Relative Frequency =0.080,PercentFrequency=, Percent Frequency =8.0\%\n - (63, 70]:Frequency=: Frequency =70,RelativeFrequency=, Relative Frequency =0.100,PercentFrequency=, Percent Frequency =10.0\%\n - (70, 77]:Frequency=: Frequency =115,RelativeFrequency=, Relative Frequency =0.164,PercentFrequency=, Percent Frequency =16.4\%\n - (77, 84]:Frequency=: Frequency =148,RelativeFrequency=, Relative Frequency =0.211,PercentFrequency=, Percent Frequency =21.1\%\n - (84, 91]:Frequency=: Frequency =142,RelativeFrequency=, Relative Frequency =0.203,PercentFrequency=, Percent Frequency =20.3\%\n - (91, 98]:Frequency=: Frequency =58,RelativeFrequency=, Relative Frequency =0.083,PercentFrequency=, Percent Frequency =8.3\%\n - (98, 105]:Frequency=: Frequency =3,RelativeFrequency=, Relative Frequency =0.004,PercentFrequency=, Percent Frequency =0.4\%\n - (105, 112]:Frequency=: Frequency =2,RelativeFrequency=, Relative Frequency =0.003,PercentFrequency=, Percent Frequency =0.3\%(values:(values:109, 109)\n - 112+:Frequency=: Frequency =0,RelativeFrequency=, Relative Frequency =0.000,PercentFrequency=, Percent Frequency =0.0\%\n - Total: Frequency = 700,RelativeFrequency=, Relative Frequency =1.000,PercentFrequency=, Percent Frequency =100.0\%\n- Primary Findings:\n - Most common age at death: (77, 84]years(years (148individuals,orindividuals, or21.1\%).\n - Only 7individuals(individuals (1.0\%$) died at age 7years\le 7\,\text{years}.

    • Zero individuals lived beyond 112years112\,\text{years}.

  • Excel Implementation via FREQUENCY Function:

    • Column C contains lower limits, Column D contains upper limits (D2:D17).

    • Range A2:A701 contains raw age data.

    • Enter formula =FREQUENCY(A2:A701, D2:D17) in cell E2 to populate bin frequencies in E2:E18.

    • Legacy Excel method: Highlight cells E2:E17, type formula, press CTRL + 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:

    1. Select data range A1:A701.

    2. Click Insert tab on ribbon.

    3. Click Insert Statistic Chart button in Charts group \rightarrow Select Histogram.

    • Excel automatically generates 1616 bins of width 7years7\,\text{years}. Tallest bar corresponds to (77,84](77, 84].

  • Creating Manual Histograms in Excel (Custom Control):

    • Uses FREQUENCY function and CONCAT (or CONCATENATE in older Excel versions) for axis labels.

    1. Select cells D2:E17.

    2. Click Insert tab \rightarrow Insert Column or Bar Chart \rightarrow Select Clustered Column.

    3. Right-click chart \rightarrow Change Chart Type \rightarrow Select single variable clustered column.

    4. Right-click data series column \rightarrow Format Data Series \rightarrow Set Gap Width to 0%0\%

    5. Right-click chart \rightarrow Select Data \rightarrow Under Horizontal Category Axis Labels click Edit \rightarrow Enter =Data!$F$2:$F$17 \rightarrow Click OK.

  • Bin Parameter Sensitivity (n=30n = 30 subset in Agedith30):

    • 55 bins (width 1212): Indicates oldest bin is most likely.

    • 88 bins (width 88): Indicates second-oldest bin is most likely; oldest is third most likely.

    • 1010 bins (width 66): Indicates oldest bin is most likely.

    • Explanation: 66 out of 3030 observations equal exactly 87years87\,\text{years}, 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 70%70\% and none exceed 100%100\%).

    • 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 (nfemale=327n_{\text{female}} = 327, nmale=373n_{\text{male}} = 373 in AgedithSex).

  • Excel Formulas for Comparative Polygons:

    • Total females in F3: `=COUNTIF(B2:B701,