Time series
When sets of categorical measurements are recorded at successive times, time can be treated as a grouping variable. Stacked barcharts are often informative displays.
Same-day treatment in hospitals
Trends in the proportion of hospital patients who are treated and released on the same day affect planning for the number of beds that are required. The diagram below shows numbers of patients in Australian hospitals, categorised by the length of their stay in hospital.
Firstly click the checkbox Stacked. This shows the increase in the total number of patients over this period.
Now choose Propn within Year from the pop-up menu. The stacked display of these proportions shows how the proportion of same-day patients increased. The unstacked version of this plot perhaps shows this increase even more clearly.
Binary variables
When the variable of interest can only take two possible values, it is called a binary variable. Examples are
This type of variable is often abstracted by calling the two categories success and failure. Note that either category could be called 'success' with this notation — there is no 'positive' implication associated with the term.
A single binary variable is described fully by the numbers of successes and failures and the proportion of successes is the most useful single summary. Comparison of several groups is based on the proportion of successes in the groups, and these can be displayed in a single bar chart.
Reliability of reverse-cycle air conditioners
The Australian consumer magazine Choice conducted a survey of subscribers in November 1995 to assess reliability of air conditioners. Each respondent who owned an air conditioner was asked about the brand and whether it had needed any repairs in the previous 12 months.
Brand | Sample size | Percentage requiring repairs |
---|---|---|
Panasonic Sanyo Fujitsu Westinghouse Mitsubishi Emailair Kelvinator Carrier |
169 51 77 99 85 104 188 169 |
2 6 7 7 9 13 13 15 |
The diagram below shows stacked bar charts for the eight brands.
Since the proportions requiring repairs are all small, the differences between the brands are not displayed well. Choose Propns for Needed repair from the pop-up menu to hide the bars for 'OK' and expand the vertical scale. The resulting diagram looks like a simple bar chart of the proportion requiring repairs for the brands.