Skip to content
Activities · Activity 3.5

Q.Write the python statements to print average marks in Science by all the students in each UT.
[Table: The chapter's case study (Program 3.1) stores unit test marks of 4 students (maximum marks 25 in each subject) in a DataFrame df created from the dictionary marksUT = {'Name':['Raman','Raman','Raman','Zuhaire','Zuhaire','Zuhaire','Ashravy','Ashravy','Ashravy','Mishti','Mishti','Mishti'], 'UT':[1,2,3,1,2,3,1,2,3,1,2,3], 'Maths':[22,21,14,20,23,22,23,24,12,15,18,17], 'Science':[21,20,19,17,15,18,19,22,25,22,21,18], 'S.St':[18,17,15,22,21,19,20,24,19,25,25,20], 'Hindi':[20,22,24,24,25,23,15,17,21,22,24,25], 'Eng':[21,24,23,19,15,13,22,21,23,22,23,20]}.]

CBSENCERTSubjective· 2mImportance★★★★★est
21% · 11/53 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Concept understanding — Grouped Mean Calculation

Grouped Mean Calculation: A First Look

Imagine you're looking at the marks of all students in a large school. You don't have a list of every single student's score — that would be thousands of numbers. Instead, someone gives you a table: "50 students scored between 40 and 50, 80 students scored between 50 and 60, and so on." You still want a single number that represents the average performance of the whole school. How do you find it when you only have groups, not individual marks?

That is the problem the grouped mean solves. It is a way to estimate the average when data is presented in class intervals (like 40–50, 50–60) with frequencies (the number of items in each interval). You cannot simply add up the original numbers because you don't have them — they have been "grouped" into ranges.

The Core Idea

The grouped mean works on a simple assumption: within each class interval, the values are spread roughly evenly. So you take the midpoint of each interval as a representative value for all the items in that group. Then you treat the problem as if every student in the 40–50 group scored exactly 45, every student in the 50–60 group scored exactly 55, and so on. From there, you calculate a weighted average — each midpoint is multiplied by how many times it occurs (the frequency), and the total is divided by the total number of items.

Note

The grouped mean is always an estimate, not an exact average. If you had the original raw data, the true mean would almost certainly be slightly different. The grouped mean is a practical approximation when raw data is unavailable or too large to handle.

Why It Matters

Grouped data is everywhere in commerce and humanities. A business might have sales data grouped by price ranges. A government might publish income data by brackets. A researcher might survey satisfaction levels on a 1–5 scale. In all these cases, you cannot access every individual response — but you still need to calculate averages for reports, comparisons, or policy decisions.

The grouped mean gives you a single, understandable number from a messy table. It allows you to compare different groups (e.g., average income in two cities) even when you only have grouped summaries. Without it, you would be stuck with raw tables that are hard to interpret at a glance.

What You Actually Do (In Words)

The process has three steps, and none of them involve a formula — just logic:

  • Find the midpoint of each class interval. For a class like 40–50, the midpoint is halfway between 40 and 50, which is 45. This represents the "typical" value in that group. …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.