Histogram
We will use the Best Actor Oscar winners (1970-2001) to learn how to create a histogram using a statistics package, and practice what we've learned about describing the histogram.
We will use the Best Actor Oscar winners (1970-2001) to learn how to create a histogram using a statistics package, and practice what we've learned about describing the histogram.
To open R with the dataset preloaded, right-click here and choose "Save Target As" to download the file to your computer. Then find the downloaded file and double-click it to open it in R.
The data have been loaded into the variable 'actor_age'. Enter the command actor_age
to see the data.
To create a histogram of the actors' age data, we need to decide how many bins to use. Let's try 8:
hist(actor_age,breaks=8)
Try replacing the number of "breaks" with 5 or 20. Which histogram gives the right amount of detail—neither too little nor too much?
Note: Using R—If you are looking at a graph in R, you may find that the command window (the one labeled "R Console") is not responsive. That is because the graph window is the "active" window. Click on the command window to make it the active window.
To open this file in StatCrunch you must first right-click here and choose "Save Target As" to download the file to your computer. Next click here to open StatCrunch in a separate window and login using your username and password.
- Click on the link “Open StatCrunch” at the top of the My StatCrunch page.
- To open the data set select the “My computer” link under Load a data set from box on the left side of the page.
- Select the "Browse" or “Choose File” (depending on which browser you're using and select the data set you downloaded
- Scroll to the bottom of the page and click on “Load File”
To create a histogram of the actors' age data:
- Choose: Graphics → Histogram.
- In the Histogram window select the column: Age.
- Press Create Graph!
To open Minitab with the actors' age data loaded, right-click here and choose "Save Target As" to download the file to your computer. Then find the downloaded file and double-click it to open it in Minitab. Note: you will likely see a dialog box appear that says "A copy of the content of this file will be added to the current project"—just click OK.
To create a histogram of the actors' age data,
- choose Graph → Histogram.
- Make sure "Simple" is highlighted and click OK.
- In the dialog box, under Graph variables, type Age (or simply double-click on Age in the left panel).
- Click OK.
To open Excel with the actors' age data loaded, right-click here and choose "Save Target As" to download the file to your computer. Then find the downloaded file and double-click it to open it in Excel.
Now create a histogram of the actors' age data:
- First we need to define the bins that Excel will use to create the histogram. In this case, our minimum data point is 31, and our max is 76. We'll use a bin width of 5, and make bins from 30 to 80:
- In one of the columns near the data, enter these numbers: 30, 35, 40, 45, etc., up to 80.
- Now click the Data Analysis button in the Analysis group on the Data tab. Then choose Histogram in the resulting pop-up window and click OK.
- In the next window, click in the box next to Input Range and then select the cells containing your data.
- Then click in the box next to Bin Range and then select the cells containing your bin information.
- Finally, check the box at the bottom of this window marked Chart Output, and then click OK.
- Excel will create a new worksheet containing the histogram and a table with the frequency counts. The histogram is usually pretty small; you can click on it and then drag one of the handles on the outside to enlarge it.
- Histograms shouldn't have spaces between the bars, so right-click on one of the bars and choose Format Data Series. Then set the gap width to 0% (No Gap).
- Before closing the Format Data Series window, click on Border Color on the left, choose Solid line, and set the color to black.
To open Excel with the actors' age data loaded, right-click here and choose "Save Target As" to download the file to your computer. Then find the downloaded file and double-click it to open it in Excel.
Now create a histogram of the actors' age data:
- First we need to define the bins that Excel will use to create the histogram. In this case, our minimum data point is 31, and our max is 76. We'll use a bin width of 5, and make bins from 30 to 80:
- In one of the columns near the data, enter these numbers: 30, 35, 40, 45, etc., up to 80.
- Now choose Tools -> Data Analysis from the top menu. Then choose Histogram in the resulting pop-up window and click OK.
- In the next window, click in the box next to Input Range and then select the cells containing your data.
- Then click in the box next to Bin Range and then select the cells containing your bin information.
- Finally, check the box at the bottom of this window marked Chart Output, and then click OK.
- Excel will create a new worksheet containing the histogram and a table with the frequency counts. The histogram is usually pretty small; you can click on it and then drag one of the handles on the outside to enlarge it.
- Histograms shouldn't have spaces between the bars, so right-click on one of the bars and choose Format Data Series. Then choose the tab marked Options and set the gap width to 0.
To open a list with the actors' age data loaded, right-click here and choose "Save Target As" to download the file to your computer. Then find the downloaded file and send it to your calculator. For instructions on how to connect your calculator to your computer and transfer a file, click here.
NOTE: This dataset is fairly small (n=32). It may be just as fast to enter the data yourself directly in L1.
The data for actor’s age is stored in L1.
Now create a histogram of the actors' age data:
Histogram
- Either clear any equations you may have in your calculator by choosing
Y=/CLEAR
, or else toggle them off by choosingY=
and then pressing the left arrow until=
is selected and pressingENTER
. - Choose
STAT PLOT (2ND/Y=)
. - Choose
4:PlotsOff
. HitENTER
. - You should see:
- Again, choose
STAT PLOT (2ND/Y=)
. - Choose
1:Plot1…Off
- Turn the plot on by using arrows to highlight the word
ON
, then pressENTER
. - Choose the
Type:
Histogram is in the first row, third graph. - Choose the correct
Xlist: L1 (2ND/1)
. - Choose
Freq: 1
(the number one). - You should see:
First we need to determine the class width and what lower value we want for our first class. In this case, our minimum data point is 31, and our max is 76. We’ll use a class width of 5, and make classes from 30 to 80.
- Choose
WINDOW
, and set the following values:
- Xmin=30—this is the lower value for the X axis. It should be lower than the smallest value in our dataset.
- Xmax=80—this is the upper value for the X axis. It should be higher than the largest value in our dataset.
- Xscl=5—this is the distance between the tick marks on the X scale, and determines how wide each class is.
- Ymin=0—this is the lower value for the Y axis.
- Ymax=10—this is the upper value for the Y axis.
- Yscl=1—this is the distance between the tick marks on the Y scale.
- Xres=1 - this is the resolution of the graph. Leave it set to 1, which is most accurate.
- You should see:
- Choose
GRAPH
. - Choose
TRACE
and then use the left and right arrows to move the cursor around the histogram to see the values for each bar.
Now describe the distribution of the ages of the Best Actor Oscar winners. Be sure to address shape, center, spread and outliers. When you are done, compare your answer to ours.