Products | Versions |
---|---|
Spotfire Statistica | 12.7 and higher |
1. Go to "File | Open Examples | Datasets | Smoking habits.sta"
2. Click on "Basic Statistics" under "Statistics" tab
3. On the "Quick" tab, select "Tables and banners"
4. Click the OK button to display the "Crosstabulation Tables" dialog box:
5. Click the "Specify tables (select variables)" button to display the variable selection dialog box. Select AGEGROUP in List1 and SMOKING in List2 as shown in the next image and click OK
6. Click OK in the "Crosstabulation Tables" dialog box to display the "Crosstabulation Tables Result" dialog. Select the "Options" tab
7. Select the "Pearson & M_L Chi-square" check box for a Chi-square test and click OK
8. Select the "Advanced" tab to create the outputs:
9. Click the "Detailed two-way tables" button to create the "2-Way Summary Table" and a separate output spreadsheet containing the Pearson Chi-Square and Maximum Likelihood Chi-Square tests:
The Pearson Chi-square test is 4.065393 with a p-value of 0.13098. Because the p-value is greater than alpha = 0.05, the null hypothesis (Smoking and Agecategory are independent) is not rejected. This can be interpreted by saying that a significant relationship does not exist between a person’s smoking status and age category.
10. To further explore this relationship, in the Crosstabulation Tables Results dialog box, click the 3D histograms button. A bivariate histogram shows the frequencies broken down across the categories of the two variables. Although some relationship appears to exist in the plot, namely that the age category < 20 has fewer smokers than non-smokers, which is opposite of the relationship in the other two categories, the statistical test did not detect a relationship.