Presentation on theme: "Categorical variable We need a frequency table, preferably with values expressed as percentages, to summarise the values of the variable. We also need."— Presentation transcript:
Categorical variable We need a frequency table, preferably with values expressed as percentages, to summarise the values of the variable. We also need a visual display, usually a bar chart, to illustrate the frequency table. How do we describe the distribution of a categorical variable?
Categorical variable A frequency table gives the values that a variable can take, together with the number of subjects that take that value, perhaps expressed as a percentage of the total.
Categorical variable For example: The International Social Survey of 1994 asked a number of subjects to indicate their agreement with the following statement: Astrology has scientific truth. The subjects selected from one of the following options: 1Definitely true 2Probably true 3Probably not true 4Definitely not true
Categorical variable The option selected by each of a sample of 50 respondents was as follows: To construct the frequency table we count the number of subjects who responded with each option.
Categorical variable Here is the frequency table for the data:
Categorical variable The bar chart for these percentage frequencies is shown below: Responses to ‘Astrology has scientific truth’ definitely not true probably not true probably true definitely true Percentage frequency 60 50 40 30 20 10 0 A bar chart is different from a histogram, because there is no scale on the horizontal axis of the bar chart. The bars can be any width and in any order.
Categorical variable A pie chart for these data can also be constructed. A pie chart is generally not a very useful display when there are more than two or three values for the variable, because it’s too hard to judge the size of the segments by eye.
Categorical variable We now need to describe the distribution of responses to the statement Astrology has scientific truth. Here are some points to keep in mind: If percentages are used, the sample size should also be mentioned in the answer. Include some percentages in the answer. Mention the most interesting aspect of the responses. It is not always necessary to mention every category.
Categorical variable A sample of 50 people were asked to respond to the statement that ‘Astrology has scientific truth’. Most people did not agree with this statement, with the majority (56%) responding that they believed that this statement was probably not true, and another 20% declaring that the statement was definitely not true. Only 8% of subjects thought that the statement was definitely true. Report