๐ Example: Number of Children per Family
Raw data from 20 families:
2, 1, 3, 2, 0, 1, 2, 3, 1, 0, 2, 1, 2, 3, 1, 0, 2, 1, 2, 1
Unit I ยท Lectures 4โ5 of 40 ยท B.Sc. Data Science, 1st Year, Semester II
Raw data (also called unorganised data) is data in its original form โ as it was collected. It is often a jumbled mass of numbers with no apparent pattern. Drawing conclusions directly from raw data is like trying to find a specific book in a library where all books are thrown on the floor โ impossible without organising them first.
Imagine throwing all your clothes randomly into a cupboard. Finding a specific shirt would take forever. Now imagine organising them: shirts on one shelf, trousers on another, socks in a drawer. Finding anything becomes easy. Classification and frequency distribution do the same thing for data.
Classification is the process of arranging or grouping data into classes (categories) or sub-classes on the basis of some common characteristics. It is the first step in organising raw data into a meaningful form for analysis.
Data can be classified on the basis of four criteria:
Data arranged according to time โ years, months, quarters, days.
Example: Year-wise sales of a company:
2020: โน50L, 2021: โน62L, 2022: โน71L, 2023: โน85L
Data arranged according to place โ region, state, country, city.
Example: State-wise population:
UP: 20 Cr, Maharashtra: 12 Cr, Bihar: 10 Cr
Data arranged according to attributes (qualities) โ gender, religion, education.
Example: Gender-wise enrollment:
Male: 250, Female: 310, Other: 5
Data arranged according to numerical values โ marks, income, height, weight.
Example: Marks-wise student count:
0โ20: 5, 20โ40: 12, 40โ60: 28, 60โ80: 35, 80โ100: 20
Click each type to explore its definition, basis of classification, and a full example:
A frequency distribution is a tabular arrangement of data that shows each class (or value) and the number of observations (frequency) falling into that class. It condenses a large volume of raw data into a compact, meaningful summary.
You have a bag of 100 marbles in different colours. To understand the composition, you sort them: 30 red, 25 blue, 20 green, 15 yellow, 10 white. This sorted table is a frequency distribution โ each colour is a class, and the count (30, 25, etc.) is the frequency.
1. Ungrouped (Simple) Frequency Distribution: Each individual value is listed separately with its frequency. Best when the data has few distinct values.
2. Grouped Frequency Distribution: Data is divided into class intervals (ranges), and the number of observations in each interval is counted. Best when data has many distinct values spread over a wide range.
When the number of distinct values in the data is small (typically fewer than 15โ20), we list each value individually and count how many times it appears. This is called an ungrouped or simple frequency distribution.
Raw data from 20 families:
2, 1, 3, 2, 0, 1, 2, 3, 1, 0, 2, 1, 2, 3, 1, 0, 2, 1, 2, 1
| No. of Children (x) | Tally Marks | Frequency (f) |
|---|---|---|
| 0 | ||| | 3 |
| 1 | |||| || | 7 |
| 2 | |||| |||| | | 7 |
| 3 | ||| | 3 |
| Total | ฮฃf = 20 |
A class is a group or range into which data is divided. E.g., 0โ10, 10โ20, 20โ30 are three classes. Each class has a lower limit and an upper limit.
Each class has two boundaries:
โข Lower Class Limit (LCL): The smallest value in the class. E.g., in 20โ30, LCL = 20.
โข Upper Class Limit (UCL): The largest value in the class. E.g., in 20โ30, UCL = 30.
Class width = Upper Limit โ Lower Limit.
In the class 20โ30: width = 30 โ 20 = 10.
All classes should ideally have equal width.
Class Mark = (Lower Limit + Upper Limit) / 2.
In the class 20โ30: midpoint = (20+30)/2 = 25.
The class mark represents the entire class in calculations.
The frequency of a class is the number of observations that fall within that class interval. It is counted using tally marks (groups of 5: ||||).
A method of counting using vertical strokes in groups of five. The fifth mark crosses the previous four (||||). This makes counting easy: each group of 5 = 5 observations.
Click "Reveal" to label each part of a class interval step by step:
The marks (out of 100) of 30 students in a Statistics test are:
12, 35, 42, 56, 78, 23, 45, 67, 89, 15, 28, 51, 73, 95, 38, 62, 47, 84, 19, 33, 58, 71, 26, 44, 69, 91, 37, 53, 76, 60
Task: Construct a grouped frequency distribution with class width of 10.
Step 1: Find the range = Maximum value โ Minimum value = 95 โ 12 = 83.
Step 2: Decide the class width = 10 (given).
Step 3: Determine number of classes โ Range / Class width = 83 / 10 โ 9 classes.
Step 4: Start from the lowest value (or a convenient round number below it). Start at 10.
Step 5: Form classes: 10โ20, 20โ30, 30โ40, 40โ50, 50โ60, 60โ70, 70โ80, 80โ90, 90โ100.
Step 6: Count observations in each class using tally marks.
| Class Interval | Tally Marks | Frequency (f) | Class Mark (x) |
|---|---|---|---|
| 10 โ 20 | ||| || | 3 | 15 |
| 20 โ 30 | ||| | | 4 | 25 |
| 30 โ 40 | |||| | | 4 | 35 |
| 40 โ 50 | |||| | 4 | 45 |
| 50 โ 60 | |||| | 4 | 55 |
| 60 โ 70 | |||| || | 5 | 65 |
| 70 โ 80 | |||| | 3 | 75 |
| 80 โ 90 | ||| | 2 | 85 |
| 90 โ 100 | || | 1 | 95 |
| Total | ฮฃf = 30 |
There are two ways to form class intervals. The choice depends on whether the upper limit of one class is the same as the lower limit of the next class.
The upper limit of one class is the lower limit of the next class. The upper limit is excluded from that class โ it belongs to the next class. Classes are continuous (no gap between them).
| Class | Includes |
|---|---|
| 0 โ 10 | 0 โค x < 10 (10 excluded) |
| 10 โ 20 | 10 โค x < 20 (20 excluded) |
| 20 โ 30 | 20 โค x < 30 (30 excluded) |
A value of 10 falls in the class 10โ20, NOT in 0โ10.
Both the lower limit and upper limit are included in the class. There is a gap between the upper limit of one class and the lower limit of the next. Classes are discontinuous.
| Class | Includes |
|---|---|
| 0 โ 9 | 0, 1, 2, ... , 9 (both included) |
| 10 โ 19 | 10, 11, ... , 19 (both included) |
| 20 โ 29 | 20, 21, ... , 29 (both included) |
A value of 10 falls in the class 10โ19.
Click each method to see how a value of 25 is classified:
An open-end class is a class that has no lower limit or no upper limit (or both). This happens when extreme values exist in the data that do not fit neatly into regular intervals. Open-end classes are written with the word "Below" or "Above" (or symbols like "<" or ">").
| Monthly Income (โน) | Frequency |
|---|---|
| Below 5,000 | 8 |
| 5,000 โ 10,000 | 15 |
| 10,000 โ 20,000 | 22 |
| 20,000 โ 50,000 | 30 |
| 50,000 and above | 5 |
| Total | 80 |
"Below 5,000" โ No lower limit โ open at the bottom.
"50,000 and above" โ No upper limit โ open at the top.
The classes 5,000โ10,000, 10,000โ20,000, and 20,000โ50,000 have both limits โ closed classes.
โ Lecture 5 โ
A cumulative frequency is the running total of frequencies. Instead of showing how many observations fall in each class, it shows how many observations fall below (or above) a certain value. Cumulative frequency distribution is obtained by successively adding the frequencies.
Imagine climbing stairs. At each step, you have climbed a certain number of steps so far. If Step 1 = 3 steps, Step 2 = 5 more, Step 3 = 2 more, then cumulatively you have climbed: 3, 8 (3+5), 10 (3+5+2). Cumulative frequency works the same way โ it keeps a running total.
Cumulative frequencies are calculated from the top of the table, adding frequencies downward. It answers: "How many observations are less than the upper limit of each class?"
Start with the frequency of the first class.
Add the frequency of the second class to the first cumulative frequency.
Continue adding until the last class.
Formula: CF(i) = f(1) + f(2) + ... + f(i)
Cumulative frequencies are calculated from the bottom of the table, adding frequencies upward. It answers: "How many observations are more than or equal to the lower limit of each class?"
Start with the frequency of the last class.
Add the frequency of the second-last class to the last cumulative frequency.
Continue adding upward until the first class.
Formula: CF(i) = f(i) + f(i+1) + ... + f(last)
Marks obtained by 40 students in a Statistics exam:
| Class Interval (Marks) | Frequency (f) |
|---|---|
| 0 โ 10 | 2 |
| 10 โ 20 | 5 |
| 20 โ 30 | 8 |
| 30 โ 40 | 12 |
| 40 โ 50 | 7 |
| 50 โ 60 | 4 |
| 60 โ 70 | 2 |
| Total | 40 |
| Marks | f | "Less Than" CF (Cumulate โ) |
"More Than" CF (Cumulate โ) |
|---|---|---|---|
| 0 โ 10 | 2 | 2 | 40 |
| 10 โ 20 | 5 | 2 + 5 = 7 | 40 โ 2 = 38 |
| 20 โ 30 | 8 | 7 + 8 = 15 | 38 โ 5 = 33 |
| 30 โ 40 | 12 | 15 + 12 = 27 | 33 โ 8 = 25 |
| 40 โ 50 | 7 | 27 + 7 = 34 | 25 โ 12 = 13 |
| 50 โ 60 | 4 | 34 + 4 = 38 | 13 โ 7 = 6 |
| 60 โ 70 | 2 | 38 + 2 = 40 | 6 โ 4 = 2 |
Click "Less Than" or "More Than" to watch the cumulative frequencies being calculated row by row:
In a "Less Than" CF table, the class boundaries replace class intervals. The cumulative frequency against a value x tells us: "How many observations are less than x."
| Marks (Less Than) | Cumulative Frequency |
|---|---|
| Less than 10 | 2 |
| Less than 20 | 7 |
| Less than 30 | 15 |
| Less than 40 | 27 |
| Less than 50 | 34 |
| Less than 60 | 38 |
| Less than 70 | 40 |
โข "Less than 30": CF = 15
โ 15 students scored below 30 marks.
โข "Less than 50": CF = 34
โ 34 students scored below 50 marks.
โข "Less than 70": CF = 40
โ All 40 students scored below 70 marks (since max is out of 70).
In a "More Than" CF table, the lower class limits are used. The cumulative frequency against a value x tells us: "How many observations are greater than or equal to x."
| Marks (More Than) | Cumulative Frequency |
|---|---|
| More than or equal to 0 | 40 |
| More than or equal to 10 | 38 |
| More than or equal to 20 | 33 |
| More than or equal to 30 | 25 |
| More than or equal to 40 | 13 |
| More than or equal to 50 | 6 |
| More than or equal to 60 | 2 |
โข "More than 0": CF = 40
โ All 40 students scored 0 or above (trivially true).
โข "More than 30": CF = 25
โ 25 students scored 30 or more.
โข "More than 60": CF = 2
โ Only 2 students scored 60 or more.
An ogive (pronounced "oh-jive") is a graph of the cumulative frequency distribution. It is a smooth curve drawn by plotting the upper class boundaries (for "Less Than" type) or lower class boundaries (for "More Than" type) on the X-axis and the corresponding cumulative frequencies on the Y-axis, then joining the points.
The median is the middle value of a dataset when arranged in order. For N observations, the median is the value of the (N/2)th observation. It divides the data into two equal halves โ 50% below and 50% above.
Step 1: Calculate N/2. For our example: N = 40, so N/2 = 20.
Step 2: Locate the value 20 on the Y-axis (cumulative frequency axis).
Step 3: Draw a horizontal line from Y = 20 to meet the ogive curve.
Step 4: From the point of intersection, draw a vertical line down to the X-axis.
Step 5: The value where the vertical line meets the X-axis is the median.
N/2 = 20. Looking at our ogive, the value 20 on the CF axis falls between the CF values 15 (at marks = 30) and 27 (at marks = 40).
By interpolation (or reading from the ogive), the median โ 33.3 marks.
Interpretation: 50% of students scored below 33.3 marks, and 50% scored above.
Click "Find Median" to see the construction lines drawn on the ogive:
Frequency โ Cumulative Frequency:
โข "Less Than" CF at class i = fโ + fโ + ... + fแตข (add downward)
โข "More Than" CF at class i = fแตข + fแตขโโ + ... + fโ (add upward)
Cumulative Frequency โ Frequency:
โข f(i) = CF(i) โ CF(iโ1) for "Less Than" type (subtract consecutive CF values)
โข f(i) = CF(i) โ CF(i+1) for "More Than" type (subtract consecutive CF values)
| Less Than | CF | f = CF(i) โ CF(iโ1) |
|---|---|---|
| Less than 10 | 2 | 2 โ 0 = 2 |
| Less than 20 | 7 | 7 โ 2 = 5 |
| Less than 30 | 15 | 15 โ 7 = 8 |
| Less than 40 | 27 | 27 โ 15 = 12 |
| Less than 50 | 34 | 34 โ 27 = 7 |
| Less than 60 | 38 | 38 โ 34 = 4 |
| Less than 70 | 40 | 40 โ 38 = 2 |
Q1: In the exclusive method, the class interval 20โ30 includes which values?
Q2: The class mark of the interval 40โ60 is:
Q3: Classification of data by time is called:
Q4: The "Less Than" cumulative frequency for the last class always equals:
Q5: The inclusive class 15โ19 is converted to exclusive form as:
Q6: An ogive is a graph of:
Q7: "Below 10" in a frequency distribution is an example of:
Q8: If the "Less Than" CF values are 5, 12, 20, 28, 30, the frequencies are:
1. The following data gives the marks (out of 50) of 25 students:
22, 35, 18, 41, 29, 33, 15, 27, 38, 45, 12, 31, 25, 40, 36, 20, 28, 34, 42, 19, 26, 37, 23, 30, 44
(a) Arrange the data in ascending order.
(b) Construct a grouped frequency distribution with class width of 5 using the exclusive method.
(c) Identify all class marks and verify that the class width is uniform.
2. Convert the following inclusive classes to exclusive classes:
(a) 10 โ 14 (b) 20 โ 29 (c) 100 โ 199 (d) 0 โ 4
3. Given the frequency distribution below, construct both "Less Than" and "More Than" cumulative frequency tables:
| Class | 5โ10 | 10โ15 | 15โ20 | 20โ25 | 25โ30 |
|---|---|---|---|---|---|
| f | 3 | 7 | 10 | 6 | 4 |
Questions? Let's discuss!
Lecture 6โ7: Representation of Data โ Tabular, Graphical & Diagrammatic
Lecture 8: Review & Problem-Solving Session
Unit I ยท Lectures 4โ5 ยท BDS113 Introduction to Statistics ยท B.Sc. Data Science, Semester II