π Example: Students by Gender
| Gender | No. of Students |
|---|---|
| Male | 120 |
| Female | 145 |
| Other | 5 |
| Total | 270 |
Unit I Β· Lectures 6β8 of 40 Β· B.Sc. Data Science, 1st Year, Semester II
A frequency table of 100 numbers is useful for computation, but the human brain processes visual information far faster than raw numbers. A well-designed graph can reveal trends, patterns, outliers, and comparisons at a glance β something a table of numbers cannot do as quickly.
Imagine describing a route with written instructions: "Go 200m north, turn left, go 500m east..." Now imagine showing a map. The map conveys the same information instantly. Similarly, a graph conveys statistical information far more effectively than raw numbers.
Data can be represented in three broad ways:
A statistical table is a systematic arrangement of data in rows and columns. It presents data in a structured, compact form that makes comparison and analysis easy. Every well-designed table has a title, row headings, column headings, body (data values), and usually a total row/column.
Classifies data by one characteristic only. Each row represents one category.
| Gender | No. of Students |
|---|---|
| Male | 120 |
| Female | 145 |
| Other | 5 |
| Total | 270 |
Classifies data by two characteristics simultaneously. Rows represent one variable; columns represent another.
| Branch | Male | Female | Total |
|---|---|---|---|
| CSE | 45 | 55 | 100 |
| ECE | 40 | 50 | 90 |
| ME | 35 | 40 | 75 |
| Total | 120 | 145 | 265 |
Each table should be numbered (e.g., Table 1, Table 2) for easy reference in the text.
A clear, concise title describing what the table shows, where the data is from, and when.
Labels at the top of each column describing the variable or category represented.
Labels at the left of each row describing the categories or class intervals.
The data values (frequencies, counts, percentages) arranged in rows and columns.
Row totals and column totals (usually the last row and last column). Grand total in the bottom-right corner.
Indicates where the data came from (e.g., "Source: Census of India 2011").
Any additional explanations, abbreviations, or caveats about the data.
A bar diagram (or bar chart) is a graphical representation using rectangular bars of equal width, where the height (or length) of each bar represents the frequency or magnitude of a category. Bars are separated by equal gaps. Bar diagrams are used for qualitative (categorical) data or discrete quantitative data.
β’ All bars have equal width
β’ There is a gap between consecutive bars (bars do NOT touch)
β’ Bar height = frequency or value
β’ Used for categorical or discrete data (NOT for continuous data β use histogram for that)
β’ Can be drawn vertically or horizontally
Three types of bar diagrams:
Example: Number of students enrolled in different branches (B.Sc. Data Science Year 1)
Example: Male & Female students in each branch (comparison of two categories per branch)
Example: Same gender-wise data, but stacked into a single bar per branch
| Feature | Simple Bar | Multiple Bar | Component (Stacked) |
|---|---|---|---|
| Bars per category | One bar | Multiple bars side-by-side | One bar, divided into segments |
| What it shows | Single variable per category | Comparison of sub-categories | Parts making up the whole |
| Best for | Simple comparison | Comparing 2β4 sub-groups | Showing composition/proportion |
| Limitation | Cannot show sub-categories | Gets cluttered with too many groups | Hard to compare exact segment sizes |
| Example | Total students per branch | Male & Female per branch | Male + Female stacked per branch |
β Lecture 7 β
A histogram is a graphical representation of a grouped frequency distribution using adjacent rectangles (bars with no gaps). Each rectangle represents a class interval, with the class interval on the X-axis and the frequency on the Y-axis. The area of each rectangle is proportional to the frequency of that class.
β’ Bars are adjacent (no gaps) β because data is continuous
β’ Bar width = class width
β’ Bar height = frequency (when classes are equal width)
β’ For unequal class widths: height = frequency density = frequency / class width
β’ Used for continuous (grouped) data only
β’ When data is continuous and divided into class intervals
β’ When you want to see the shape of the distribution (symmetric, skewed, bimodal)
β’ When you want to identify peaks, gaps, and outliers
β’ NOT suitable for categorical data (use bar diagram instead)
β’ Tall bars = most observations fall in that range
β’ Short bars = few observations
β’ Shape: Symmetric (bell-shaped), right-skewed (tail to right), left-skewed (tail to left)
Example: Marks of 40 students (from Lectures 4β5 data)
A frequency polygon is a line graph obtained by plotting the class marks (midpoints) on the X-axis and the corresponding frequencies on the Y-axis, then joining the points with straight lines. To close the polygon, two additional points with zero frequency are added at the ends (using the midpoints of the imaginary classes before the first and after the last class).
Step 1: Calculate the class mark (midpoint) of each class.
Step 2: Plot points: (class markβ, fβ), (class markβ, fβ), ..., (class markβ, fβ).
Step 3: Add closing points: one class width before the first midpoint with f=0, and one class width after the last midpoint with f=0.
Step 4: Join all points with straight lines.
β’ Always a closed polygon (starts and ends on the X-axis)
β’ Can be drawn on a histogram by joining the midpoints of the tops of the bars
β’ Useful for comparing two distributions on the same graph
β’ The total area under the polygon equals the total area under the histogram
Example: Same marks data β class marks vs frequencies, with closing points
A pie chart (or circle diagram) is a circular diagram divided into sectors (slices), where each sector represents a category. The angle (and hence the area) of each sector is proportional to the frequency or percentage of that category. The entire circle represents 100% of the data, or equivalently 360Β°.
Imagine a round cake representing the total data. Each person gets a slice proportional to their share. If Student A studies 30% of the time, their slice covers 30% of the cake (108Β° out of 360Β°).
Central angle of a sector = (Frequency of category / Total frequency) Γ 360Β°
Or equivalently:
Central angle = (Percentage / 100) Γ 360Β°
| Category | Amount (βΉ) | % | Angle (Β°) |
|---|---|---|---|
| Food | 4,000 | 40% | 144Β° |
| Rent | 2,500 | 25% | 90Β° |
| Transport | 1,500 | 15% | 54Β° |
| Books | 1,000 | 10% | 36Β° |
| Misc. | 1,000 | 10% | 36Β° |
| Total | 10,000 | 100% | 360Β° |
| Diagram | Best For | Data Type | Key Feature |
|---|---|---|---|
| Simple Bar | Comparing categories | Categorical / Discrete | Equal-width bars with gaps |
| Multiple Bar | Comparing sub-groups | Categorical with 2+ variables | Grouped side-by-side |
| Component Bar | Showing composition | Categorical (parts of whole) | Stacked segments |
| Histogram | Distribution shape | Continuous (grouped) | No gaps, area β frequency |
| Freq. Polygon Freq. Curve | Trends & comparison | Continuous (grouped) | Line graph of class marks vs f |
| Pie Chart | Proportions / parts of whole | Categorical | Sectors proportional to frequency |
| Ogive | Finding median, percentiles | Continuous (grouped) | Cumulative frequency curve |
β Lecture 8 β
Q1. Explain the difference between descriptive and inferential statistics with one example each. (2 marks)
Q2. In a study of plant growth, a biologist measures the height of 50 plants selected from a farm of 5,000 plants. Identify: (a) Population, (b) Sample, (c) Parameter, (d) Statistic. (2 marks)
Q3. Classify the following as Nominal, Ordinal, Discrete, or Continuous: (i) Number of books on a shelf, (ii) Brand of laptop, (iii) Customer rating: 1β5 stars, (iv) Speed of a car in km/h. (2 marks)
Q4. The marks (out of 50) of 20 students are: 12, 35, 28, 41, 19, 33, 45, 22, 38, 27, 31, 44, 15, 36, 29, 42, 18, 34, 26, 40.
Construct a grouped frequency distribution with class width of 5 using the exclusive method. (3 marks)
Q5. Given: f = 4, 7, 10, 6, 3 for classes 10β20, 20β30, 30β40, 40β50, 50β60. Construct both "Less Than" and "More Than" cumulative frequency tables. (3 marks)
Q6. The monthly expenditure of a family is: Food βΉ8,000, Rent βΉ5,000, Education βΉ3,000, Transport βΉ2,000, Savings βΉ2,000. Construct a pie chart by computing the central angles. (3 marks)
Q7. What is the difference between a histogram and a bar diagram? Can one be used in place of the other? Explain with examples. (2 marks)
Q8. Convert the inclusive classes 5β9, 10β14, 15β19, 20β24 to exclusive form. Also calculate the class marks of the converted classes. (2 marks)
Descriptive statistics summarises and presents data without making predictions. Example: The average marks of a class is 72.
Inferential statistics makes predictions about a population from a sample. Example: From a survey of 1,000 voters, we predict the election outcome for the entire state.
(a) Population: All 5,000 plants on the farm.
(b) Sample: The 50 plants selected and measured.
(c) Parameter: The true average height of all 5,000 plants (ΞΌ β unknown).
(d) Statistic: The average height of the 50 measured plants (xΜ β calculated from sample).
(i) Number of books on a shelf β Discrete (countable whole numbers)
(ii) Brand of laptop β Nominal (categories with no order)
(iii) Customer rating: 1β5 stars β Ordinal (ordered categories)
(iv) Speed of a car β Continuous (can take any numerical value)
Range = 45 β 12 = 33. Classes with width 5, starting at 10:
| Class | Tally | f |
|---|---|---|
| 10β15 | || | 2 |
| 15β20 | ||| | 3 |
| 20β25 | || | 2 |
| 25β30 | |||| | 4 |
| 30β35 | ||| | 3 |
| 35β40 | ||| | 3 |
| 40β45 | ||| | 3 |
| 45β50 | β | 0 |
| Total | 20 |
| Class | f | "Less Than" CF | "More Than" CF |
|---|---|---|---|
| 10β20 | 4 | 4 | 30 |
| 20β30 | 7 | 11 | 26 |
| 30β40 | 10 | 21 | 19 |
| 40β50 | 6 | 27 | 9 |
| 50β60 | 3 | 30 | 3 |
Total = 8000 + 5000 + 3000 + 2000 + 2000 = βΉ20,000
| Category | βΉ | % | Angle |
|---|---|---|---|
| Food | 8,000 | 40% | 144Β° |
| Rent | 5,000 | 25% | 90Β° |
| Education | 3,000 | 15% | 54Β° |
| Transport | 2,000 | 10% | 36Β° |
| Savings | 2,000 | 10% | 36Β° |
| Total | 20,000 | 100% | 360Β° |
Bar diagram: Gaps between bars, used for categorical/discrete data. Bar height = frequency.
Histogram: No gaps (adjacent bars), used for continuous grouped data. Area proportional to frequency.
No, they cannot be used interchangeably. A histogram for categorical data would incorrectly imply continuity. A bar diagram for continuous data would incorrectly show gaps.
| Inclusive | Exclusive | Class Mark |
|---|---|---|
| 5β9 | 4.5β9.5 | 7 |
| 10β14 | 9.5β14.5 | 12 |
| 15β19 | 14.5β19.5 | 17 |
| 20β24 | 19.5β24.5 | 22 |
Q1: Which of the following is a parameter?
Q2: Data classified by region (North, South, East, West) is an example of:
Q3: In a histogram, the bars are:
Q4: The "More Than" cumulative frequency of the first class always equals:
Q5: A pie chart sector for a category with 20% of the data has a central angle of:
Q6: Converting the inclusive class 25β29 to exclusive form gives:
Q7: An ogive is used to find:
Q8: "Number of children per family" is:
Q9: Which diagram has bars with equal width, gaps between bars, and is used for categorical data?
Q10: The frequency polygon requires plotting which values on the X-axis?
1. Define statistics. Distinguish between descriptive and inferential statistics with two examples each.
2. Explain the terms: population, sample, parameter, statistic, variable, and attribute. Give one example of each.
3. A researcher collects data on the following: (a) Monthly rainfall in mm, (b) Religion of citizens, (c) Customer satisfaction: Low/Medium/High, (d) Number of accidents per month, (e) Temperature in Β°C, (f) Brand preference. Classify each as (i) primary or secondary, (ii) qualitative or quantitative, (iii) if quantitative: discrete or continuous; if qualitative: nominal or ordinal.
4. The weights (in kg) of 30 students are: 45, 52, 48, 55, 60, 47, 53, 58, 62, 50, 56, 49, 51, 57, 63, 46, 54, 59, 61, 48, 52, 55, 60, 47, 53, 58, 62, 50, 56, 49. Construct a grouped frequency distribution with class width 5 using the exclusive method. Compute class marks for each class.
5. For the data in Q4, construct (a) "Less Than" CF table, (b) "More Than" CF table, (c) "Less Than" ogive. Use the ogive to estimate the median.
6. Construct a histogram and a frequency polygon for the data in Q4.
7. The budget allocation of a company: Marketing βΉ15L, R&D βΉ10L, Production βΉ25L, HR βΉ5L, Admin βΉ5L. Draw a pie chart showing all angle calculations.
8. Explain with a diagram the difference between a histogram and a bar diagram. When would each be inappropriate?
9. Convert the following inclusive classes to exclusive: (a) 0β4, (b) 10β19, (c) 100β199, (d) 5β9. Calculate class marks for all.
10. BONUS: Find data from a newspaper or government website on any topic of your choice. Organise it into a frequency table, construct all relevant graphs, and write a 200-word analysis of what the data reveals.
You now have a solid foundation in the fundamentals of statistics.
Lecture 9β10: Measures of Central Tendency β Mean (Arithmetic, Weighted, Combined)
Lecture 11β12: Median, Mode, Empirical Relationship
Lecture 13β14: Partition Values β Quartiles, Deciles, Percentiles
Lecture 15: Review & Problem-Solving
Unit I Β· Lectures 6β8 Β· BDS113 Introduction to Statistics Β· B.Sc. Data Science, Semester II