📘 CodingMarble Learn

Statistics: Asking Questions, Averages and Stacked Bar Graphs

Statistics starts with a question that has many possible answers. We collect data, organise it, show it in a graph, and find one number that sums it up. The mean is the fair share, the median is the middle value, and the mode is the most common value. A weighted average gives more importance to some values. Stacked and 100% stacked bar graphs show how a whole is split into parts.

🎬 Step-by-step story

  1. We ask: "How do children in our class come to school?" Each of 30 children joins a group. Now we can count: walk 9, cycle 7, bus 10, car 4.
  2. Mean is a fair share. Piles of 4, 7, 5, 8 and 6 cubes: move cubes from tall piles to short ones until all are 6. Mean = total ÷ count = 30 ÷ 5 = 6.
  3. Put the values in order: 1, 2, 2, 6, 7, 8, 9. The middle one, 6, is the median. The value seen most often, 2, is the mode.
  4. A weighted average counts important values more times. A test (80, weight 1) and a final exam (60, weight 3): (80 + 3 × 60) ÷ 4 = 65.
  5. A stacked bar shows parts of a total on top of each other. A 100% stacked bar stretches every bar to the same height, so we compare percentages fairly.
  6. Free play: change five values and watch the mean line, the median bar and the mode change.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Why is "What is my height?" not a statistical question?

It has only one answer, so there is no data that varies. "What are the heights of my classmates?" needs many answers.

Why does the mean equal the level height when cubes are moved?

Moving cubes does not add or remove any. The total stays 30. When 5 piles are equal, each has 30 ÷ 5 = 6, which is the mean.

Why must data be put in order before finding the median?

The median is the middle of the ordered list. In jumbled data the middle position can hold any value.

Can mean, median and mode be different numbers for the same data?

Yes. For 1, 2, 2, 6, 7, 8, 9 the mean is 5, the median is 6 and the mode is 2.

Why is a weighted average not just the plain average?

The plain average treats every value as equally important. When the final exam counts 3 times, its value is repeated 3 times, pulling the average towards it.

When should I use a 100% stacked bar instead of a stacked bar?

When groups have different totals and you want to compare shares (percentages), not counts.

Statistical investigative questions

A statistical question is one whose answer comes from data that varies. "How tall am I?" has one answer. "How tall are the students in my class?" has many answers, so it is statistical.

An investigation has four steps:

  1. Ask a clear question (who, what, which group).
  2. Collect data (survey, measuring, counting).
  3. Organise and show it (tally, frequency table, bar graph).
  4. Analyse and answer (find mean, median or mode; say what the data tells you).

A good question names the group and something you can measure or count.

Mean, median and mode

Mean (average) = sum of all values ÷ number of values. It is the fair share if everything were split equally.

Median = the middle value after putting data in order. If there are n values and n is odd, it is the ((n + 1) ÷ 2)th value. If n is even, it is the average of the two middle values.

Mode = the value that appears most often. There can be one mode, more than one, or none.

From a frequency table (value x, frequency f): mean = Σfx ÷ Σf.

Which average should I use?

Weighted average

Sometimes some values are more important. Each value x gets a weight w (how many times it counts).

Weighted average = (w₁x₁ + w₂x₂ + …) ÷ (w₁ + w₂ + …)

Example: 2 kg of rice at ₹40 and 3 kg at ₹50. Average price = (2 × 40 + 3 × 50) ÷ 5 = ₹46 per kg, not ₹45, because there is more of the costly rice. Weights can also be percentages that add up to 100%.

Stacked and 100% stacked bar graphs

A stacked bar graph draws one bar per group, and splits each bar into coloured parts placed on top of each other. The full height shows the total; each colour shows a part.

A 100% stacked bar graph makes every bar the same height (100%). Each part shows its percentage: part ÷ total × 100. Use it when totals are different but you want to compare shares fairly.

Always add a legend (which colour means what) and a title.

Board exam pattern

Statistics and Probability carries 10 marks in CBSE Class 9 (2026-27). Expect: find mean, median and mode of raw data or a frequency table, a weighted average (marks or prices), reading and drawing a stacked or 100% stacked bar graph, and choosing a good statistical question.

Try it at home

Ask 10 family members or friends: "How many hours did you sleep last night?" Write the numbers. Find the mean, the median and the mode. Which one describes your group best? Then ask your friends in two classes how they come to school and draw a 100% stacked bar for each class.

Key formulas and definitions

Worked examples

1. Which is a statistical investigative question: (a) How many pencils are in my bag? (b) How many pencils do students in Class 9 carry?

(b). Its answer varies from student to student, so we must collect data. (a) has just one answer.

2. Find the mean of 12, 15, 18, 20 and 25.

Sum = 90. Number of values = 5. Mean = 90 ÷ 5 = 18.

3. Find the median of 3, 8, 5, 10, 7, 12.

In order: 3, 5, 7, 8, 10, 12. There are 6 values (even), so median = (7 + 8) ÷ 2 = 7.5.

4. Shoe sizes of 20 children: size 5 (3 children), 6 (8), 7 (6), 8 (3). Find the mode, median and mean.

Mode = 6 (highest frequency 8). Median: 10th and 11th values are both 6, so median = 6. Mean = (5×3 + 6×8 + 7×6 + 8×3) ÷ 20 = 129 ÷ 20 = 6.45.

5. A shop mixes 2 kg of rice at ₹40/kg with 3 kg at ₹50/kg. What is the average price per kg?

Weighted average = (2 × 40 + 3 × 50) ÷ (2 + 3) = 230 ÷ 5 = ₹46 per kg.

6. Projects count 20%, tests 30% and the final exam 50%. Riya scores 90, 70 and 80. Find her final score.

0.2 × 90 + 0.3 × 70 + 0.5 × 80 = 18 + 21 + 40 = 79.

7. Class A has 30 students: 12 like cricket, 18 like football. Class B has 50: 25 like cricket, 25 football. Draw the 100% stacked bar values.

Class A: cricket 12 ÷ 30 × 100 = 40%, football 60%. Class B: cricket 50%, football 50%. Both bars are 100% tall; B's cricket part is taller even though A has fewer students.

8. The mean of 5 numbers is 12. Four of them are 6, 14, 9 and 11. Find the fifth.

Total = 5 × 12 = 60. Four numbers add to 40. Fifth = 60 − 40 = 20.

Common mistakes

Practice quiz

1. The mean of 2, 4, 6, 8 is:
2. The median of 1, 3, 3, 7, 9 is:
3. The mode of 4, 5, 5, 6, 6, 6, 7 is:
4. In a 100% stacked bar graph, every bar has:
5. Which is a statistical question?

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is the difference between mean, median and mode?

Mean is the sum divided by the count. Median is the middle value after ordering. Mode is the most frequent value.

How do you calculate a weighted average?

Multiply each value by its weight, add these, and divide by the sum of the weights: Σwx ÷ Σw.

What is a 100% stacked bar graph?

A bar graph where every bar is the same height (100%) and is split into coloured parts showing each part's percentage of the total.

Where this is taught

Canada (Ontario)Grade 9D. Data
ItalyScuola secondaria di primo grado – classe 3ªData and prediction
ItalySecondaria di secondo grado – classe 1ªData and prediction
ItalySecondaria di secondo grado – classe 1ªData and prediction
ItalySecondaria di secondo grado – classe 1ªData and prediction
ItalySecondaria di secondo grado – classe 1ªResearch methodology
ItalySecondaria di secondo grado – classe 2ªData and prediction
ItalySecondaria di secondo grado – classe 2ªData and prediction
ItalySecondaria di secondo grado – classe 2ªData and prediction
ItalySecondaria di secondo grado – classe 2ªResearch methodology
PolandSzkoła podstawowa, klasa VIIIReading data and descriptive statistics
RomaniaClasa a VIII-aFunctions
Spain2º ESOStochastic sense
Spain3º ESOStochastic sense
Ukraine9 класMathematical tasks and real-world processes
CBSE (India)Class 9Statistics and Probability
England (GCSE, A level)Year 9Statistics
England (GCSE, A level)Year 102. Processing, representing and analysing data (part 1)
USA (Common Core, NGSS, AP)Grade 9Descriptive statistics
USA (Common Core, NGSS, AP)Grade 9Descriptive statistics
FranceSecondeQuantitative skills
Russia7 классPresenting data
Russia7 классDescriptive statistics
Russia8 классData
China八年级(初二)Ch.24 Data analysis

Learn next

Related lessons

All Maths lessons