Boxplots are very useful for examining the distribution of your data, but if you are using a t-test to compare means, boxplots are somewhat misleading because they show the median instead of the mean, which is what the t-test uses. There is a different plot that is better suited to reflecting the results of a t-test: the simple error bar chart. Click on the Graphs → Chart Builder menu option. In the dialog that opens, click on the "Gallery" tab in the bottom panel and select "Bar" from the "Choose from" window:
In the bottom row of icons is the simple error bar chart:
Grab it and drag it into the chart preview area at the top. The chart preview area should change into this:
Near the Chart Builder dialog you should see another dialog window called "Element Properties". If you don’t, you can open it by pushing the "Element Properties" button in the Chart Builder dialog. It looks like this:
Note that in the panel of that dialog labeled "Statistics", the statistic is set to "Mean". That tells you that SPSS will be printing a point at the mean of each condition. Below, the checkbox labeled "Display error bars" is checked and the "Error Bars Represent" button group is set to "Confidence intervals" at 95%. Perfect. This will print the means for each condition, along with the 95% confidence interval for each mean.
To change the title of the y axis, go the the Element Properties dialog and, at the top, change "Edit Properties of" from "Point1" to "Y-Axis1 (Point1)":
Change the "Axis Label" to "Mean Tip Percentage". Click "Apply". You will not see any changes in the Chart Preview. In the Chart Builder dialog, click "OK" to create the graph. You should see it appear in the Output Window.
Okay, this looks pretty good, but there are two things that would make it look better: 1) getting rid of the gray background, and 2) changing the scale of the y-axis so that it does not start at zero. Double-click on the chart to open the Chart Editor. Double-click on the gray background to launch the Properties dialog. Click on the white rectangle just above the color palette, then click "Apply" (see this page for a review of how to do this). Next, in the Chart Editor dialog, click on one of the numbers showing the scale of the y-axis (shown on the right in the picture below. Note that the y-axis numbers have become circled in yellow when clicked):
Double-clicking on those numbers should open the Properties dialog (shown on the left in the picture above). Go to the "Scale" tab and change the "Minimum" from 0 to 10. Then click "Apply" in the Properties tab, then "Close" to close that dialog. You should be left with the Chart Editor dialog. Go ahead and close it by either clicking the "X" in the upper right corner of the window or clicking File → Close. You should have the figure below in your Output Window:
A good figure caption (words that you put below figures in an article) for the above plot would be "Means and 95% confidence intervals for tip percentages by chocolate condition." That plot provides an effective summary of the data by showing you 1) the central tendencies of the two groups (their means) and 2) the confidence intervals for the means, indicating how precise those estimates of the means are.
The confidence intervals you have generated are based on 92 data points, 46 in each group, and they are fairly narrow. That's good because it means that you have a more precise estimate. To see how confidence intervals get bigger as sample size decreases, look at the two plots below.
First is the original plot, with all 92 subjects, and second is a plot made from a random sample of 30 of those subjects.
Note how the confidence intervals in the first plot are smaller than the ones in the second plot. With more data, your estimate of the means is more precise. In the second figure, you can be 95% confident that the population mean in the Chocolate condition is somewhere between a 16 and 20 percent tip. In the figure on the left, that interval shrinks to a 17-to-19 percent tip. Your estimate of the mean has become more precise.
More troll trouble. There is currently a bug that prevents you from exporting one plot at a time and also requires you to use syntax instead of a button. To work around this, you can export all the plots that you have made into a folder, and then you need to search through those to find the one you want. To save your plot as an image file, click on File → Export. You will need to change three options: Change "Objects to Export" from "All" to "All visible". (note: it would be great to choose "Selection" here, which would only export one plot, but choosing that option results in nothing being saved.) Under "Document", change "Type" to "None (Graphics only)". Under "Graphics", change "Type" to "PNG file". The PNG file type is recommended when the output is simple line drawings.
Give your file a name in the line at the bottom and save it someplace where you can find it later. Then click Paste (not "OK"! That just closes the dialog without doing anything.) and you will see new language appear in the Syntax window. It is possible that you already have a Syntax window open, so if you dont’t see it right away, click on the SPSS icon in your Start bar and look for a window called "Syntax1":
In the syntax, select that language that just printed out (it should begin with "OUTPUT EXPORT" and click the Run → Selection menu option (or click the Run Selection icon:
Look in the folder you specified to find your image files. Remember that this will print out all the plots you have made so far, so you will need to find the image you want (likely the last one).
There is a stats homework assignment on comparing means (and reviewing reliability) that accompanies this tutorial. To begin the assignment, you can log in to your moodle account for this course.