Frequency Table in Descriptive Data Analysis
A frequency table is one of the most fundamental tools in descriptive statistics, used to organize
and summarize data. It provides a comprehensive overview of how data is distributed across
distinct values or intervals, making it easier to analyze patterns, trends, and variability. Below is
an in-depth explanation designed to answer a 16-mark question.
Definition of a Frequency Table
A frequency table is a tabular summary of data that shows:
1. Individual values (for small datasets) or grouped intervals (for large datasets).
2. The frequency (f) of each value or interval, which represents the number of times it
appears in the dataset.
3. Optional components like:
o Cumulative frequency: The running total of frequencies.
o Relative frequency: The proportion of each frequency to the total dataset, often
expressed as a percentage.
Importance of a Frequency Table
1. Data Organization:
o A frequency table organizes raw data into a clear and structured format, making it
easier to identify patterns, clusters, or gaps.
2. Summarization:
o It simplifies complex datasets, especially large ones, by grouping data into
intervals or categories.
3. Analysis Basis:
o Frequency tables are the foundation for graphical representations (e.g.,
histograms, bar charts) and advanced statistical analyses.
Key Components of a Frequency Table
1. Values/Intervals:
o The unique values or ranges (for grouped data) in the dataset.
o For continuous data, equal-width intervals (also called bins) are often used.
2. Frequency (f):
o The count of data points for each value or interval.
o Example: If 4 students scored between 70 and 80, the frequency for the interval
70–80 is 4.
3. Relative Frequency:
o Shows how much each frequency contributes to the total dataset as a proportion.
o Formula: Relative Frequency=FrequencyTotal Observations\text{Relative
Frequency} = \frac{\text{Frequency}}{\text{Total
Observations}}Relative Frequency=Total ObservationsFrequency
Expressed as a percentage for easier interpretation.
o
4. Cumulative Frequency:
o The running total of frequencies from the first value/interval to the current one.
o Useful for identifying medians, quartiles, and percentiles.
Steps to Create a Frequency Table
1. Step 1: Organize the Data
o Sort the raw data in ascending order.
2. Step 2: Create Intervals (if necessary)
o For continuous data, divide the range into equal-width intervals.
o Example: For data ranging from 10 to 50, intervals could be {10–20, 21–30,
31–40, 41–50}.
3. Step 3: Count Frequencies
o Count how many data points fall into each value or interval. This becomes the
frequency.
4. Step 4: Add Optional Columns
o Compute cumulative frequency and relative frequency.
Example of a Frequency Table
Dataset (Exam Scores):
5, 8, 8, 12, 15, 15, 20, 20, 20, 25, 25, 30, 35, 35, 40
1. Step 1: Sort the Data
5, 8, 8, 12, 15, 15, 20, 20, 20, 25, 25, 30, 35, 35, 40
2. Step 2: Create Intervals
Choose equal-width intervals: {5–10, 11–20, 21–30, 31–40}
3. Step 3: Count Frequencies
Count data points in each interval.
Frequency Cumulative
Interval Relative Frequency (%)
(f) Frequency
315×100=20%\frac{3}{15} \times 100 = 20\%153
5–10 3 3
×100=20%
515×100=33.3%\frac{5}{15} \times 100 =
11–20 5 8
33.3\%155×100=33.3%
415×100=26.7%\frac{4}{15} \times 100 =
21–30 4 12
26.7\%154×100=26.7%
315×100=20%\frac{3}{15} \times 100 = 20\%153
31–40 3 15
×100=20%
Advantages of a Frequency Table
1. Simplifies Large Datasets:
o Helps condense raw data into a meaningful summary.
2. Identifies Patterns:
o Makes it easier to spot clusters, gaps, and outliers.
3. Facilitates Data Visualization:
o Forms the basis for constructing histograms, bar charts, and pie charts.
4. Supports Statistical Calculations:
o Essential for calculating measures like mean, median, mode, and standard
deviation.
5. Highlights Distributions:
o Shows whether the data is skewed, symmetrical, or uniformly distributed.
Applications of a Frequency Table
1. Education:
o Summarizing exam results to understand performance distributions.
2. Market Research:
o Analyzing survey results or customer preferences.
3. Healthcare:
o Categorizing patient data by age, symptoms, or treatment outcomes.
4. Finance:
o Grouping income levels or stock price ranges for analysis.
Visualizing Frequency Tables
Histogram: Represents intervals on the x-axis and frequencies on the y-axis.
Bar Chart: Displays frequency or relative frequency for categorical data.
Pie Chart: Uses relative frequency to show proportions.
data = [5, 8, 8, 12, 15, 15, 20, 20, 20, 25, 25, 30, 35, 35, 40]
# Step 1: Define intervals (for grouped data)
intervals = [(5, 10), (11, 20), (21, 30), (31, 40)]
# Initialize frequency table
frequency_table = []
# Step 2: Count frequencies for each interval
for interval in intervals:
lower, upper = interval
count = sum(lower <= x <= upper for x in data)
frequency_table.append({
"Interval": f"{lower}-{upper}",
"Frequency": count
})
# Step 3: Add Cumulative and Relative Frequencies
total_data_points = len(data)
cumulative_frequency = 0
for entry in frequency_table:
cumulative_frequency += entry["Frequency"]
entry["Cumulative Frequency"] = cumulative_frequency
entry["Relative Frequency (%)"] = (entry["Frequency"] /
total_data_points) * 100
# Print the frequency table
print("Frequency Table:")
print(f"{'Interval':<10}{'Frequency':<10}{'Cumulative Frequency':<20}
{'Relative Frequency (%)':<20}")
for entry in frequency_table:
print(f"{entry['Interval']:<10}{entry['Frequency']:<10}
{entry['Cumulative Frequency']:<20}{entry['Relative Frequency
(%)']:<20.2f}")