Short Answer
To create a histogram, first determine the range by subtracting the starting value from the ending value. Then decide on the number of intervals, which influences the histogram’s granularity, and calculate the class width by dividing the range by the number of intervals.
Step 1: Determine the Range
Start by identifying the starting value and the ending value of your data set. The range is calculated using a simple subtraction:
- Range = Ending Value – Starting Value
- For example, if your starting value is 32.5 and your ending value is 100.5, then:
- Range = 100.5 – 32.5 = 68
Step 2: Decide Number of Intervals
Next, determine how many intervals (or classes) you want to divide your data into. The number of intervals affects the granularity of your histogram. For example:
- You may choose 5 intervals for simplicity.
Step 3: Calculate the Class Width
Now, use the range and the number of intervals to find the class width. Divide the range by the number of intervals:
- Class Width = Range / Number of Intervals
- Continuing with our example: Class Width = 68 / 5 = 13.6
- This means each bar or interval in the histogram will be 13.6 units wide.