how to find class width
To find class width in statistics, you just need to think: “How wide is each class/interval in my table or histogram?”
Core idea (short answer)
There are two very common ways class width is talked about:
- From a frequency table or histogram that already has classes
- Class width = upper boundary − lower boundary of a class.
* If classes are equal, you can also do: class width = lower boundary of next class − lower boundary of current class.
- From raw data when you want to design classes
- Step 1: Find the range : range = maximum value − minimum value.
* Step 2: Decide how many classes nnn you want.
* Step 3: Use the **class width formula** :
Class width=rangen\text{Class width}=\frac{\text{range}}{n}Class width=nrange
Often you then round up to a convenient number (like 2, 5, 10).
Mini example: using a table
Suppose you have a frequency table of ages (years):
- 10–19
- 20–29
- 30–39
Here:
- Lower boundary of a class = 10, 20, 30, etc.
- Upper boundary of a class = 19, 29, 39, etc.
So the class width is:
- 19 − 10 = 9, or
- 20 − 10 = 10 (if you treat limits as 10–20, 20–30, etc.).
In most school examples with whole numbers, teachers take 10–20, 20–30, etc., so the class width is 10. The key idea is you’re measuring how many units a class covers.
Mini example: starting from raw data
Imagine test scores go from 50 to 100, and you want 5 classes.
- Range = 100 − 50 = 50.
- Number of classes n=5n=5n=5.
- Class width = range ÷ number of classes = 50 ÷ 5 = 10.
So you might create classes like:
- 50–60
- 60–70
- 70–80
- 80–90
- 90–100
Each interval has a width of 10.
Common formulas at a glance
Here’s a quick HTML table you can reuse or embed:
html
<table>
<thead>
<tr>
<th>Situation</th>
<th>Formula for class width</th>
<th>Notes</th>
</tr>
</thead>
<tbody>
<tr>
<td>From an existing class</td>
<td>Upper boundary − lower boundary</td>
<td>Used when the frequency table is already given. [web:5][web:7]</td>
</tr>
<tr>
<td>From consecutive classes</td>
<td>Lower boundary of next class − lower boundary of current class</td>
<td>Works when all classes have equal width. [web:5]</td>
</tr>
<tr>
<td>From raw data</td>
<td>(Maximum value − minimum value) ÷ number of classes</td>
<td>First find range, then divide by desired number of classes. [web:1][web:3][web:5][web:7][web:9]</td>
</tr>
</tbody>
</table>
Little extra: choosing number of classes
You might see rules like Sturges’ rule to choose the number of classes:
Number of classes = 1+3.322logN1+3.322\log N1+3.322logN, where NNN is the
sample size.
Once you pick that number, you plug it into the class width formula above.
TL;DR
- If the table is already made: class width = upper boundary − lower boundary of a class.
- If you’re making the classes from raw data:
- Find range (max − min),
- Decide number of classes nnn,
- Class width = range ÷ nnn.
Bottom note: Information gathered from public forums or data available on the internet and portrayed here.