{"id":250,"date":"2021-10-26T17:57:43","date_gmt":"2021-10-26T17:57:43","guid":{"rendered":"https:\/\/courses.lumenlearning.com\/lumen-danacenter-statsmockup\/?post_type=chapter&#038;p=250"},"modified":"2022-02-18T17:05:57","modified_gmt":"2022-02-18T17:05:57","slug":"3a","status":"publish","type":"chapter","link":"https:\/\/courses.lumenlearning.com\/lumen-danacenter-statsmockup\/chapter\/3a\/","title":{"raw":"What to Know About Displaying Categorical Data: 3A - 2","rendered":"What to Know About Displaying Categorical Data: 3A &#8211; 2"},"content":{"raw":"<div class=\"textbox learning-objectives\">\r\n<h3>goals for this section<\/h3>\r\nAfter completing this section, you should feel comfortable performing these skills.\r\n<ul>\r\n \t<li><a href=\"#Categorical Variables\">Determine which variables are categorical from raw data.<\/a><\/li>\r\n \t<li><a href=\"#Frequency Tables\">Read and interpret a frequency table<\/a><\/li>\r\n \t<li><a href=\"#create frequency table\">Use a data analysis tool to create a frequency table from a dataset<\/a><\/li>\r\n \t<li><a href=\"#Bar Graphs\">Read and interpret a bar graph.<\/a><\/li>\r\n \t<li><a href=\"#CreateBar\">Use technology to create a bar graph from a dataset.<\/a><\/li>\r\n \t<li><a href=\"#Pie Charts\">Read and interpret a pie chart.<\/a><\/li>\r\n \t<li><a href=\"#CreatePie\">Use technology to create a pie chart from a dataset.<\/a><\/li>\r\n<\/ul>\r\nClick on a skill above to jump to its location in this section.\r\n\r\n<\/div>\r\nWhen describing data using graphical representations, certain variables in the data are appropriate for certain visualizations. To prepare for the upcoming activity, you will need to identify variables that would be appropriate for bar graphs and pie charts and answer research questions by reading bar graphs and pie charts. To do this, you will need to be able to determine which variables in a dataset are categorical, understand how frequency tables are formed, and understand how bar graphs and pie charts are formed.\r\n<h2>Categorical Variables<\/h2>\r\n<span style=\"background-color: #ffff00;\">In a previous section (1C)<\/span>, you learned the difference between categorical and quantitative variables. Let's take a moment to refresh that information before diving into a deep exploration of categorical variables.\r\n<div class=\"textbox examples\">\r\n<h3>Recall<\/h3>\r\nWhat is the distinguishing feature of a categorical variable? That is, how can we tell a categorical variable apart from a quantitative variable?\r\n<p style=\"text-align: left;\">Core Skill:[reveal-answer q=\"244835\"]Identify a variable as\u00a0categorical or quantitative[\/reveal-answer]<\/p>\r\n[hidden-answer a=\"244835\"]\r\n\r\nA variable is classified as <strong>categorical<\/strong> if it places an individual into one of several groups.\r\n<ul>\r\n \t<li>Eye color, zip code, education level, and gender are examples of categorical data.<\/li>\r\n<\/ul>\r\nA variable is classified as <strong>quantitative<\/strong> if it takes numerical values that can be manipulated arithmetically.\r\n<ul>\r\n \t<li>Height, cost, exam scores, and temperature are examples of quantitative data.<\/li>\r\n<\/ul>\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\nPractice identifying categorical variables in a list in the interactive example. Then, for the data table that follows, identify the categorical variables to answer Question 1.\r\n<div class=\"textbox exercises\">\r\n<h3>Interactive Example<\/h3>\r\nWhich variable(s) in the list below are categorical?\r\n<p style=\"padding-left: 30px;\"><em>Age<\/em>, <em>marital status<\/em>, <em>number of children in the household<\/em>, <em>zip code<\/em>,<em> income<\/em>, <em>education level<\/em><\/p>\r\n[reveal-answer q=\"129517\"]Show Answer[\/reveal-answer]\r\n[hidden-answer a=\"129517\"]\r\n\r\nThe categorical variables are: <em>marital status<\/em>, <em>zip code<\/em>, <em>education level<\/em> since we cannot do arithmetic on these observations.\r\n\r\n<em>Age,\u00a0<\/em><em>Number of children in the household<\/em>, and\u00a0<em>income<\/em> are quantitative since we could find a numerical average of each of these.\r\n\r\nNote that <em>income<\/em> could be made categorical by collecting data in categories of income levels: under 20k, 21k - 50k, 51k - 100k, etc.\u00a0[\/hidden-answer]\r\n\r\n<\/div>\r\nNow it's your turn to practice what you know by looking at a real dataset obtained from a survey and displayed in the table below. Read the information given about the dataset and its variables, then answer the questions that follow.\r\n<h3 id=\"Categorical Variables\">Identify Categorical Variables in a Dataset<\/h3>\r\n<div class=\"textbox tryit\">\r\n<h3>identifying characteristics of a categorical variable<\/h3>\r\n<strong><span style=\"background-color: #99cc00;\">[Perspective Video -- a 3-instructors video illustrating the identifying characteristics of a categorical variable in raw data.)<\/span><\/strong>\r\n\r\n<\/div>\r\nIn 2013, students of the statistics class at FSEV UK, a Slovakian University, were asked to invite their friends to participate in a survey[footnote]Young people survey. (2016, December 6). Kaggle. Retrieved from https:\/\/www.kaggle.com\/miroslavsabo\/young-people-survey[\/footnote]. Data for the first 15 out of 1,007 young people who completed the survey are displayed below.\r\n<table border=\"1\">\r\n<tbody>\r\n<tr>\r\n<td style=\"text-align: center;\" colspan=\"8\"><strong>Young People Survey<\/strong><strong>\r\n<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\"><strong>Alcohol<\/strong><\/td>\r\n<td style=\"text-align: center;\"><strong>Age<\/strong><\/td>\r\n<td style=\"text-align: center;\"><strong>Height<\/strong><\/td>\r\n<td style=\"text-align: center;\"><strong>Punctuality<\/strong><\/td>\r\n<td style=\"text-align: center;\"><strong>Number of siblings<\/strong><\/td>\r\n<td style=\"text-align: center;\"><strong>Enjoy Music 1=strongly disagree, 5=strongly agree<\/strong><\/td>\r\n<td style=\"text-align: center;\"><strong>Internet usage<\/strong><\/td>\r\n<td style=\"text-align: center;\"><strong>Left \u2013 right handed<\/strong><\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\">drink a lot<\/td>\r\n<td style=\"text-align: center;\">20<\/td>\r\n<td style=\"text-align: center;\">163<\/td>\r\n<td style=\"text-align: center;\">I am always on time<\/td>\r\n<td style=\"text-align: center;\">1<\/td>\r\n<td style=\"text-align: center;\">5<\/td>\r\n<td style=\"text-align: center;\">few hours a day<\/td>\r\n<td style=\"text-align: center;\">right handed<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\">drink a lot<\/td>\r\n<td style=\"text-align: center;\">19<\/td>\r\n<td style=\"text-align: center;\">163<\/td>\r\n<td style=\"text-align: center;\">I am often early<\/td>\r\n<td style=\"text-align: center;\">2<\/td>\r\n<td style=\"text-align: center;\">4<\/td>\r\n<td style=\"text-align: center;\">few hours a day<\/td>\r\n<td style=\"text-align: center;\">right handed<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\">drink a lot<\/td>\r\n<td style=\"text-align: center;\">20<\/td>\r\n<td style=\"text-align: center;\">176<\/td>\r\n<td style=\"text-align: center;\">I am often running late<\/td>\r\n<td style=\"text-align: center;\">2<\/td>\r\n<td style=\"text-align: center;\">5<\/td>\r\n<td style=\"text-align: center;\">few hours a day<\/td>\r\n<td style=\"text-align: center;\">right handed<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\">drink a lot<\/td>\r\n<td style=\"text-align: center;\">22<\/td>\r\n<td style=\"text-align: center;\">172<\/td>\r\n<td style=\"text-align: center;\">I am often early<\/td>\r\n<td style=\"text-align: center;\">1<\/td>\r\n<td style=\"text-align: center;\">5<\/td>\r\n<td style=\"text-align: center;\">most of the day<\/td>\r\n<td style=\"text-align: center;\">right handed<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\">social drinker<\/td>\r\n<td style=\"text-align: center;\">20<\/td>\r\n<td style=\"text-align: center;\">170<\/td>\r\n<td style=\"text-align: center;\">I am always on time<\/td>\r\n<td style=\"text-align: center;\">1<\/td>\r\n<td style=\"text-align: center;\">5<\/td>\r\n<td style=\"text-align: center;\">few hours a day<\/td>\r\n<td style=\"text-align: center;\">right handed<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\">never<\/td>\r\n<td style=\"text-align: center;\">20<\/td>\r\n<td style=\"text-align: center;\">186<\/td>\r\n<td style=\"text-align: center;\">I am often early<\/td>\r\n<td style=\"text-align: center;\">1<\/td>\r\n<td style=\"text-align: center;\">5<\/td>\r\n<td style=\"text-align: center;\">few hours a day<\/td>\r\n<td style=\"text-align: center;\">right handed<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\">social drinker<\/td>\r\n<td style=\"text-align: center;\">20<\/td>\r\n<td style=\"text-align: center;\">177<\/td>\r\n<td style=\"text-align: center;\">I am often early<\/td>\r\n<td style=\"text-align: center;\">1<\/td>\r\n<td style=\"text-align: center;\">5<\/td>\r\n<td style=\"text-align: center;\">less than an hour a day<\/td>\r\n<td style=\"text-align: center;\">right handed<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\">drink a lot<\/td>\r\n<td style=\"text-align: center;\">19<\/td>\r\n<td style=\"text-align: center;\">184<\/td>\r\n<td style=\"text-align: center;\">I am always on time<\/td>\r\n<td style=\"text-align: center;\">1<\/td>\r\n<td style=\"text-align: center;\">5<\/td>\r\n<td style=\"text-align: center;\">few hours a day<\/td>\r\n<td style=\"text-align: center;\">right handed<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\">social drinker<\/td>\r\n<td style=\"text-align: center;\">18<\/td>\r\n<td style=\"text-align: center;\">166<\/td>\r\n<td style=\"text-align: center;\">I am often early<\/td>\r\n<td style=\"text-align: center;\">1<\/td>\r\n<td style=\"text-align: center;\">5<\/td>\r\n<td style=\"text-align: center;\">few hours a day<\/td>\r\n<td style=\"text-align: center;\">right handed<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\">drink a lot<\/td>\r\n<td style=\"text-align: center;\">19<\/td>\r\n<td style=\"text-align: center;\">174<\/td>\r\n<td style=\"text-align: center;\">I am often running late<\/td>\r\n<td style=\"text-align: center;\">3<\/td>\r\n<td style=\"text-align: center;\">5<\/td>\r\n<td style=\"text-align: center;\">few hours a day<\/td>\r\n<td style=\"text-align: center;\">right handed<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\">social drinker<\/td>\r\n<td style=\"text-align: center;\">19<\/td>\r\n<td style=\"text-align: center;\">175<\/td>\r\n<td style=\"text-align: center;\">I am often early<\/td>\r\n<td style=\"text-align: center;\">2<\/td>\r\n<td style=\"text-align: center;\">5<\/td>\r\n<td style=\"text-align: center;\">less than an hour a day<\/td>\r\n<td style=\"text-align: center;\">left handed<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\">never<\/td>\r\n<td style=\"text-align: center;\">17<\/td>\r\n<td style=\"text-align: center;\">176<\/td>\r\n<td style=\"text-align: center;\">I am often running late<\/td>\r\n<td style=\"text-align: center;\">1<\/td>\r\n<td style=\"text-align: center;\">5<\/td>\r\n<td style=\"text-align: center;\">few hours a day<\/td>\r\n<td style=\"text-align: center;\">right handed<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\">social drinker<\/td>\r\n<td style=\"text-align: center;\">24<\/td>\r\n<td style=\"text-align: center;\">168<\/td>\r\n<td style=\"text-align: center;\">I am often running late<\/td>\r\n<td style=\"text-align: center;\">10<\/td>\r\n<td style=\"text-align: center;\">5<\/td>\r\n<td style=\"text-align: center;\">few hours a day<\/td>\r\n<td style=\"text-align: center;\">right handed<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\">social drinker<\/td>\r\n<td style=\"text-align: center;\">19<\/td>\r\n<td style=\"text-align: center;\">165<\/td>\r\n<td style=\"text-align: center;\">I am often early<\/td>\r\n<td style=\"text-align: center;\">1<\/td>\r\n<td style=\"text-align: center;\">5<\/td>\r\n<td style=\"text-align: center;\">few hours a day<\/td>\r\n<td style=\"text-align: center;\">right handed<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"text-align: center;\">social drinker<\/td>\r\n<td style=\"text-align: center;\">22<\/td>\r\n<td style=\"text-align: center;\">175<\/td>\r\n<td style=\"text-align: center;\">I am often early<\/td>\r\n<td style=\"text-align: center;\">1<\/td>\r\n<td style=\"text-align: center;\">5<\/td>\r\n<td style=\"text-align: center;\">most of the day<\/td>\r\n<td style=\"text-align: center;\">right handed<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\nThe following eight variables are included in the dataset. The variable names are presented in <em>italics<\/em>, followed by a brief description. <span style=\"background-color: #ffff00;\">You may recall from Forming Connections in (1D) that this is often called a\u00a0<em>data dictionary<\/em>.<\/span>\r\n<ul>\r\n \t<li><em>Alcohol<\/em>: \u201cnever,\u201d \u201csocial drinker,\u201d or \u201cdrink a lot\u201d<\/li>\r\n \t<li><em>Age<\/em>: Years<\/li>\r\n \t<li><em>Height<\/em>: Height in centimeters (cm)<\/li>\r\n \t<li><em>Punctuality<\/em>: \u201cI am often early,\u201d \u201cI am often on time,\u201d or \u201cI am often running late\u201d<\/li>\r\n \t<li><em>Number of siblings <\/em><\/li>\r\n \t<li><em>Enjoy music<\/em>: Participants were asked \u201cDo you enjoy music?\u201d and reported on a 5-point Likert scale: strongly disagree = 1, strongly agree = 5<\/li>\r\n \t<li><em>Internet usage<\/em>: \u201cno time at all,\u201d \u201cless than an hour a day,\u201d \u201cfew hours a day,\u201d or \u201cmost of the day\u201d<\/li>\r\n \t<li><em>Left - right handed<\/em><\/li>\r\n<\/ul>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>Question 1<\/h3>\r\n[ohm_question]240631[\/ohm_question]\r\n\r\n[reveal-answer q=\"576725\"]Hint[\/reveal-answer]\r\n[hidden-answer a=\"576725\"]Recall that a categorical variable is a variable that places an individual into one of several groups.[\/hidden-answer]\r\n\r\n<\/div>\r\n&nbsp;\r\n<h2>Frequency Tables<\/h2>\r\nA <strong>frequency table <\/strong>lists the number of observations (the <strong>frequency<\/strong>) of each unique value of a categorical variable. The frequency is commonly referred to as the <strong>count<\/strong>. See the example below, which illustrates a partially complete, simple frequency table for a survey in which 20 people were asked to answer a question by choosing one of four responses: strongly disagree, disagree, agree, or strongly agree.\r\n<table style=\"border-collapse: collapse; width: 44.444%;\" border=\"1\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 33.3333%; text-align: center;\">Variable Name<\/td>\r\n<td style=\"width: 33.3333%; text-align: center;\">Frequency (number of times each response appears in the dataset)<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 33.3333%;\">Strongly disagree<\/td>\r\n<td style=\"width: 33.3333%; text-align: center;\">2<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 33.3333%;\">Disagree<\/td>\r\n<td style=\"width: 33.3333%; text-align: center;\">5<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 33.3333%;\">Agree<\/td>\r\n<td style=\"width: 33.3333%; text-align: center;\">9<\/td>\r\n<\/tr>\r\n<tr>\r\n<td style=\"width: 33.3333%;\">Strongly agree<\/td>\r\n<td style=\"width: 33.3333%; text-align: center;\"><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<div class=\"textbox exercises\">\r\n<h3>Interactive example<\/h3>\r\nFor the frequency table above, answer the following questions\r\n\r\na) If 20 responses were collected in the survey, how many people responded with \"Strongly agree?\"\r\n\r\n[reveal-answer q=\"596200\"]Show Answer[\/reveal-answer]\r\n[hidden-answer a=\"596200\"]There are 4 \"Strongly agree\" responses. I.e., if there are 9 + 5 + 2 = 16 responses showing, and if the total frequency is 20, then 20 - 16 = 4. [\/hidden-answer]\r\n\r\n&nbsp;\r\n\r\nb) What is the total frequency for the table?\r\n\r\n[reveal-answer q=\"276251\"]Show Answer[\/reveal-answer]\r\n[hidden-answer a=\"276251\"]20. There were 20 total responses, which represents the total frequency.[\/hidden-answer]\r\n\r\n<\/div>\r\n<h3 id=\"Frequency Tables\">Read and interpret a frequency table<\/h3>\r\nFrequency tables often include a column for the relative frequency. The <strong>relative frequency<\/strong> represents the proportion of observations that are in a particular category and can be expressed as a decimal or a percentage. To find relative frequency, divide the count of a particular category by the sum of all the counts. See the recall box below for a refresher on how to convert ratios to proportions and percentages. Also see the Student Resources: <a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/Stats+Exemplar\/Resource+-+Fractions%2C+Decimals%2C+Percentages.pdf\"><em>Fractions, Decimals, Percentages<\/em><\/a> and\u00a0<em><a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/Stats+Exemplar\/Resource+-+Ratios+and+Fractions.pdf\">Ratios and Fractions<\/a>.<\/em>\r\n<div class=\"textbox examples\">\r\n<h3>Recall<\/h3>\r\nWhen calculating relative frequencies, you'll need to convert a proportion to a percent. You've probably done this before, so this should be a refresher.\r\n\r\nClick the link below to see how to convert the fraction [latex]\\dfrac{2}{15}[\/latex] to a proportion and then to a percentage.\r\n\r\nCore Skill: [reveal-answer q=\"177645\"]Convert a fraction to a decimal or a percent[\/reveal-answer]\r\n\r\n[hidden-answer a=\"177645\"]\r\n<ul>\r\n \t<li>To convert a ratio (a fraction) to a proportion in decimal form, divide the numerator by the denominator in a calculator. The result will be a number in decimal form.<\/li>\r\n \t<li>To convert the proportion from decimal form to a percentage, multiply it by 100. That is, first locate the decimal point in the proportion, then move it two places to the right.<\/li>\r\n<\/ul>\r\nEx. In the table below, we see that [latex]\\dfrac{2}{15} = 0.1\\bar{3}[\/latex].\r\n\r\nTo convert [latex]0.1\\bar{3}[\/latex] to a percent, move the decimal two places to the right to obtain [latex]13.\\bar{3}[\/latex] (the bar over the 3 indicates that the 3 repeats without terminating). In the table below, the number is rounded to the hundredths place (two decimal places) as 13.33%.\r\n\r\n[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox tryit\">\r\n<h3>creating a frequency table<\/h3>\r\n<strong><span style=\"background-color: #99cc00;\">[Worked Example -- a 3-instructors worked example of creating a frequency table for a categorical variable identified from a data table. )<\/span><\/strong>\r\n\r\n<\/div>\r\nThe following frequency table displays the frequency and relative frequency (as a decimal and a percentage) of the categorical variable <em>Alcohol <\/em>for the first 15 young people who responded to the survey.\r\n<table style=\"width: 437px; height: 80px;\">\r\n<tbody>\r\n<tr style=\"height: 20px;\">\r\n<td style=\"width: 82.75px; height: 20px; text-align: center;\"><strong>Alcohol <\/strong><\/td>\r\n<td style=\"width: 64.7344px; height: 20px; text-align: center;\"><strong>Frequency<\/strong><\/td>\r\n<td style=\"width: 146.844px; height: 20px; text-align: center;\"><strong>Relative Frequency<\/strong><\/td>\r\n<td style=\"width: 91.6719px; height: 20px; text-align: center;\"><strong>Percent\u00a0<\/strong><strong>(%)<\/strong><\/td>\r\n<\/tr>\r\n<tr style=\"height: 29px;\">\r\n<td style=\"width: 82.75px; height: 21px; text-align: center;\"><strong>Never<\/strong><\/td>\r\n<td style=\"width: 64.7344px; height: 21px; text-align: center;\">2<\/td>\r\n<td style=\"width: 146.844px; height: 21px; text-align: center;\">2\/15 = 0.1333<\/td>\r\n<td style=\"width: 91.6719px; height: 21px; text-align: center;\">13.33<\/td>\r\n<\/tr>\r\n<tr style=\"height: 49px;\">\r\n<td style=\"width: 82.75px; height: 21px; text-align: center;\"><strong>Social drinker<\/strong><\/td>\r\n<td style=\"width: 64.7344px; height: 21px; text-align: center;\"><\/td>\r\n<td style=\"width: 146.844px; height: 21px; text-align: center;\"><\/td>\r\n<td style=\"width: 91.6719px; height: 21px; text-align: center;\"><\/td>\r\n<\/tr>\r\n<tr style=\"height: 10px;\">\r\n<td style=\"width: 82.75px; height: 18px; text-align: center;\"><strong>Drink a lot<\/strong><\/td>\r\n<td style=\"width: 64.7344px; height: 18px; text-align: center;\"><\/td>\r\n<td style=\"width: 146.844px; height: 18px; text-align: center;\"><\/td>\r\n<td style=\"width: 91.6719px; height: 18px; text-align: center;\"><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>question 2<\/h3>\r\nComplete the frequency table above. To find the frequency, look back at the first data table. Round relative frequencies to four decimal places and the corresponding percentages to two decimal places.\r\n\r\n[reveal-answer q=\"849602\"]Hint[\/reveal-answer]\r\n[hidden-answer a=\"849602\"]To find the relative frequency, divide the frequency for each category by the total frequency. To find the percent column, you will convert the relative frequencies to percentages by multiplying by 100. See Resource <a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/Stats+Exemplar\/Resource+-+Rounding+and+Estimation.pdf\" target=\"_blank\" rel=\"noopener\"><strong>Rounding and Estimation<\/strong><\/a>, if needed.[\/hidden-answer]\r\n\r\n<\/div>\r\n<h3>Use technology to create a frequency table from a dataset<\/h3>\r\n<p id=\"create frequency table\">Displaying frequency tables for small datasets might be feasible by hand, but we need technology to display frequency tables for larger datasets.<\/p>\r\nLet\u2019s use technology to create a frequency table to understand the variable <em>Enjoy Music<\/em> for all 1,007 students included in the survey. Follow these steps:\r\n<div class=\"textbox\">\r\n\r\nGo to the data analysis tool\u00a0 <em>Describing and Exploring Categorical Data<\/em>\u00a0 at\u00a0<a href=\"https:\/\/dcmathpathways.shinyapps.io\/EDA_categorical\/\" target=\"_blank\" rel=\"noopener\">https:\/\/dcmathpathways.shinyapps.io\/EDA_categorical\/<\/a>\r\n<p style=\"padding-left: 30px;\">Step 1) Select the\u00a0<strong>One Categorical Variable<\/strong> tab.<\/p>\r\n<p style=\"padding-left: 30px;\">Step 2)\u00a0Locate the dropdown under <strong>Enter Data<\/strong>\u00a0and select <strong>From Textbook<\/strong>.<\/p>\r\n<p style=\"padding-left: 30px;\">Step 3) Locate the dropdown under <strong>Dataset<\/strong> and select <strong>Young Adults: Enjoy Music<\/strong>.\u00a0 The frequency table will appear to the right. It will be\u00a0\u00a0easier to read if the categories are presented in order. Follow Steps 4 and 5 below to rearrange it if needed.<\/p>\r\nTo rearrange the frequency table in numerical order from 1 to 5:\r\n<p style=\"padding-left: 30px;\">Step 4) Select the <strong>Customize Order<\/strong> box under <strong>Options<\/strong>.<\/p>\r\n<p style=\"padding-left: 30px;\">Step 5) Locate the <strong>Choose Order of Categories<\/strong> box and sequentially select 1, 2, 3, 4, and 5.<\/p>\r\n\r\n<\/div>\r\nRefer to the frequency table you just created to answer Questions 3 and 4.\r\n<div class=\"textbox key-takeaways\">\r\n<h3>question 3<\/h3>\r\nHow many surveyed young adults strongly disagreed that they enjoy music?\r\n\r\n[reveal-answer q=\"975895\"]Hint[\/reveal-answer]\r\n[hidden-answer a=\"975895\"]Hint: Strongly disagree = (1)[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>question 4<\/h3>\r\nWhat percentage of young adults surveyed strongly agreed that they enjoy music?\r\n\r\n[reveal-answer q=\"354943\"]Hint[\/reveal-answer]\r\n[hidden-answer a=\"354943\"]Hint: Strongly agree = (5)[\/hidden-answer]\r\n\r\n<\/div>\r\nWhen exploring categorical data, it is helpful to convert the data from tables into charts or graphs. Bar graphs and pie charts provide visual summaries of data that help us quickly identify how the individual category frequencies relate to one another and to the total count.\r\n<h2 id=\"Bar Graphs\">Bar Graphs<\/h2>\r\nOne of the most commonly used graphs for visualizing the distribution of a categorical variable is a bar graph. In a <strong>bar graph<\/strong>, categories are represented by bars that are separated from each other. The bars can be vertical or horizontal, and the height (or length) of each bar represents the measure of the data in each category. Bars can represent frequencies, relative frequencies (proportion), or percentages.\r\n\r\n<img class=\"alignnone wp-image-1688\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5738\/2021\/10\/19204205\/Screen-Shot-2022-01-19-at-3.41.46-PM.png\" alt=\"The bar graph is titled &quot;Vertical Bar Graph&quot; with the x-axis labeled &quot;Eye Color&quot;, and the y-axis labeled &quot;Height (in inches)&quot;. The height (in inches) ranges from 0-80 in increments of 10. The eye color and their heights (in inches) are as follows: Blue 48, Brown 72, Grey 59, Hazel 76, and Green 63.\" width=\"403\" height=\"243\" \/><img class=\"alignnone wp-image-1689\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5738\/2021\/10\/19204355\/Screen-Shot-2022-01-19-at-3.43.40-PM.png\" alt=\"The bar graph is titled &quot;Horizontal Bar Graph&quot; with the x-axis labeled &quot;Height (in inches)&quot;, and the y-axis labeled &quot;Eye Color&quot;. The height (in inches) ranges from 0-80 in increments of 10. The eye color and their heights (in inches) are as follows: Blue 48, Brown 72, Grey 59, Hazel 76, and Green 63.\" width=\"444\" height=\"238\" \/>\r\n<h3 id=\"Bar Graphs\">Read and interpret a bar graph<\/h3>\r\nThe bar graph below displays the number of cones each of a small ice cream shop sold on the 4th of July. Note that the counts (numbers of cones) are listed on the vertical axis while each flavor sold is listed along the horizontal axis. Examine the graph, then answer the questions in the Interactive Example that follows.\r\n\r\n<img class=\"alignnone wp-image-2958 size-full\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5738\/2021\/10\/08195223\/IceCream_Hist1.png\" alt=\"A bar graph entitled &quot;Ice Cream Sales.&quot; Butter Pecan has a count of less than 10. Strawberry has a count of more than 50 and less than 60. Neapolitan has a count of 30. Vanilla has a count of 45. Chocolate has a count of 50. Cookies and Cream has a count of 30. Mint Chocolate chip has a count of 60. Other has a count between 20 and 30.\" width=\"832\" height=\"350\" \/>\r\n<div class=\"textbox exercises\">\r\n<h3>Interactive example<\/h3>\r\nUse the Ice Cream Flavors bar graph above to answer these questions.\r\n\r\na)\u00a0 Which flavor sold the fewest number of cones?[reveal-answer q=\"901078\"]Show Answer[\/reveal-answer]\r\n[hidden-answer a=\"901078\"]Butter Pecan[\/hidden-answer]\r\n\r\n&nbsp;\r\n\r\nb) About how many cones of Neapolitan ice cream were sold?\u00a0[reveal-answer q=\"110753\"]Show Answer[\/reveal-answer]\r\n[hidden-answer a=\"110753\"]30[\/hidden-answer]\r\n\r\n<\/div>\r\nNow that you have had a chance to become familiar with this categorical visualization, follow the directions below to use technology to create a bar graph for a real dataset.\r\n<h3 id=\"CreateBar\">Use technology to create a bar graph from a dataset<\/h3>\r\nRecall the frequency table you created earlier in this section using the <em>Describing and Exploring Categorical Data tool.\u00a0<\/em>When you used the technology tool to create the frequency table, a bar graph was also created on that page. Let's go back to the tool to explore the bar graph. If you still have the tool open for this dataset, just follow steps 4 and 5 below to view the bar graph.\r\n<div class=\"textbox\">\r\n\r\nGo to the data analysis tool\u00a0 <em>Describing and Exploring Categorical Data<\/em>\u00a0 at\u00a0 \u00a0<a href=\"https:\/\/dcmathpathways.shinyapps.io\/EDA_categorical\/\" target=\"_blank\" rel=\"noopener\">https:\/\/dcmathpathways.shinyapps.io\/EDA_categorical\/<\/a>\r\n<p style=\"padding-left: 30px;\">Step 1) Select the\u00a0<strong>One Categorical Variable<\/strong> tab.<\/p>\r\n<p style=\"padding-left: 30px;\">Step 2)\u00a0Locate the dropdown under <strong>Enter Data<\/strong> and select <strong>From Textbook<\/strong>.<\/p>\r\n<p style=\"padding-left: 30px;\">Step 3) Locate the dropdown under <strong>Dataset<\/strong> and select <strong>Young Adults: Enjoy Music<\/strong>.<\/p>\r\nSee the bar graph under the frequency table on the tool page. You can change the appearance of the graph using the<strong>\u00a0Options\u00a0<\/strong>selections. You can show counts or percentages on the vertical axis or in the bars, change the bars from vertical to horizontal, customize order, and even change the color of the bars in the\u00a0<strong>Modify\/Include\u00a0<\/strong>section. Let's explore how to change the bars from vertical to horizontal and then change the horizontal axis from Count to Percent (%).\r\n<p style=\"padding-left: 30px;\">Step 4)\u00a0<span style=\"font-size: 1em;\">Click the <strong>Horizontal Bars<\/strong> box to change the perspective of the graph from counts as bar-heights to bar-lengths. Note how the Count range switches from the vertical axis to the horizontal axis.\u00a0<\/span><\/p>\r\n<p style=\"padding-left: 30px;\"><span style=\"font-size: 1em;\">Step 5) Click the <strong>Show Percent<\/strong> box to change the heights (or lengths of horizontal bars) from counts to percentages. Note how the Count range switches to Percent (%).\u00a0<\/span><\/p>\r\n\r\n<\/div>\r\nTake a moment to explore switching these options back and forth to see how the graph changes then answer Question 5 below.\r\n<div class=\"textbox key-takeaways\">\r\n<h3>question 5<\/h3>\r\n[ohm_question]240591[\/ohm_question]\r\n\r\n[reveal-answer q=\"287570\"]Hint[\/reveal-answer]\r\n[hidden-answer a=\"287570\"]Hint: The heights of the bars represent the measure of the frequency, relative frequency, or percentage of surveyed young adults for each music rating.[\/hidden-answer]\r\n\r\n<\/div>\r\n<h2 id=\"Pie Charts\">Pie Charts<\/h2>\r\nAnother common graph used for displaying the distribution of categorical data is a pie chart. In a <strong>pie chart<\/strong>, categories are represented by wedges in a circle and are proportional in size to the percentage of individuals\/items in each category.\u00a0There are several ways to present pie chart data visually. A pie chart may include all the information needed to read it within each wedge or they may provided some image in the chart and some in a key off to the side.\r\n\r\n<img class=\"alignnone wp-image-1691\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5738\/2021\/10\/19210226\/Screen-Shot-2022-01-19-at-4.01.15-PM.png\" alt=\"The pie chart is titled &quot;Students in a Course&quot; and includes 4 sections: Freshman (35%), Sophomore (29%), Junior (23%), and Senior (13%). These percentages are included inside the pie chart.\" width=\"449\" height=\"267\" \/><img class=\"alignnone wp-image-1692\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5738\/2021\/10\/19210253\/Screen-Shot-2022-01-19-at-4.02.12-PM.png\" alt=\"The pie chart is titled &quot;Students in a Course&quot; and includes 4 sections: Freshman (35%), Sophomore (29%), Junior (23%), and Senior (13%). In this pie chart, only the percentages are included inside the pie chart with the student classifications listed outside of the pie chart in a legend.\" width=\"411\" height=\"246\" \/>\r\n<h3 id=\"Pie Charts\">Read and interpret a pie chart<\/h3>\r\nPie charts are useful for showing percentages (parts of a whole) at some particular instance in time. For example, the following chart displays flavors of ice cream sold at an ice cream shop as a percentage of all ice cream sales on July 4th. This chart contains the same information as the bar chart does above, but shows percentages rather than counts.\r\n\r\n<img class=\"alignnone wp-image-1801 size-full\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5738\/2021\/10\/24221019\/Screen-Shot-2022-01-24-at-5.09.54-PM.png\" alt=\"The pie chart is titled &quot;Ice Cream Sales&quot; and is divided into 8 sections: Butter Pecan (2%), Strawberry (18%), Neapolitan (10%), Vanilla (15%), Chocolate (17%), Cookies and Cream (10%), Mint Chocolate Chip (20%), Other (8%).\" width=\"1736\" height=\"914\" \/>\r\n<div class=\"textbox exercises\">\r\n<h3>Interactive example<\/h3>\r\nUse the chart above to answer the following questions.\r\n\r\na) What flavor made up the largest percentage of ice cream sales?\r\n[reveal-answer q=\"140681\"]Show Answer[\/reveal-answer]\r\n[hidden-answer a=\"140681\"]Mint Chocolate Chip[\/hidden-answer]\r\n\r\nb) What percent of sales was attributed to strawberry ice cream?\r\n<p style=\"padding-left: 30px;\">[reveal-answer q=\"806070\"]Show Answer[\/reveal-answer]\r\n[hidden-answer a=\"806070\"]18%[\/hidden-answer]<\/p>\r\n\r\n<\/div>\r\n<h3 id=\"CreatePie\">Use technology to create a pie chart from a dataset<\/h3>\r\nWhen you used the <em>Describing and Exploring Categorical Data\u00a0<\/em>data tool to create the frequency table and bar graph, you also had the option to create a pie chart. Let's do that now. If you still have the tool open, skip to Step 4 below.\r\n<div class=\"textbox\">\r\n\r\nGo to the data analysis tool\u00a0 <em>Describing and Exploring Categorical Data<\/em>\u00a0 at\u00a0 \u00a0<a href=\"https:\/\/dcmathpathways.shinyapps.io\/EDA_categorical\/\" target=\"_blank\" rel=\"noopener\">https:\/\/dcmathpathways.shinyapps.io\/EDA_categorical\/<\/a>\r\n<p style=\"padding-left: 30px;\">Step 1) Select the\u00a0<strong>One Categorical Variable<\/strong> tab.<\/p>\r\n<p style=\"padding-left: 30px;\">Step 2)\u00a0Locate the dropdown under <strong>Enter Data<\/strong> and select <strong>From Textbook<\/strong>.<\/p>\r\n<p style=\"padding-left: 30px;\">Step 3) Locate the dropdown under <strong>Dataset<\/strong> and select <strong>Young Adults: Enjoy Music<\/strong>.<\/p>\r\n<p style=\"padding-left: 30px;\">Step 4)\u00a0<span style=\"font-size: 1em;\">Under the\u00a0<strong>Additional Plots<\/strong> section, select <strong>Pie Chart<\/strong>.\u00a0<\/span>Scroll down to see the pie chart on the page under the bar graph.<\/p>\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>question 6<\/h3>\r\n[ohm_question]240593[\/ohm_question]\r\n\r\n[reveal-answer q=\"282030\"]Hint[\/reveal-answer]\r\n[hidden-answer a=\"282030\"]Make sure that One Categorical Variable and the correct dataset (Young Adults: Enjoy Music) are selected.[\/hidden-answer]\r\n\r\n<\/div>\r\nIt's difficult to visualize a summary of the <em>Enjoy music <\/em>categories since just one or two of them dominate the chart. Let's leave the tool now and explore another one of the variables from the dataset: <em>Punctuality<\/em>. The following pie chart displays the distribution of the categorical variable <em>Punctuality<\/em>. Use this pie chart to answer Questions 6 and 7 below.\r\n\r\n<img class=\"aligncenter wp-image-1109\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5738\/2021\/10\/12005123\/3A-Pie-Chart-67.png\" alt=\"A pie chart of young adults punctuality. The section for &quot;I am often early&quot; is 38.5%. The section for &quot;I am always on time&quot; is 34.6%. The section for &quot;I am often running late&quot; is 26.9%.\" width=\"504\" height=\"324\" \/>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>question 7<\/h3>\r\nAccording to the pie chart, what percentage of surveyed young adults said they are often running late?\r\n\r\n[reveal-answer q=\"100546\"]Hint[\/reveal-answer]\r\n[hidden-answer a=\"100546\"]Put Answer Here[\/hidden-answer]\r\n\r\n<\/div>\r\n<div class=\"textbox key-takeaways\">\r\n<h3>question 8<\/h3>\r\nWhat percentage of surveyed young adults said they are often early or always on time?\r\n\r\n[reveal-answer q=\"899480\"]Hint[\/reveal-answer]\r\n[hidden-answer a=\"899480\"]What do <em>you<\/em> think?[\/hidden-answer]\r\n\r\n<\/div>\r\n<h2>Summary<\/h2>\r\nIn this preview section, you've had a chance to practice the tasks that will be essential to forming deeper connections in the next activity. This is a good time to sum it all up before moving on.\r\n<ul>\r\n \t<li>In question 1, you identified categorical variables from a list of variables appearing in raw data.<\/li>\r\n \t<li>In question 2, you completed a frequency table from raw data by hand.<\/li>\r\n \t<li>In question 3, you used technology to create a frequency table from raw data.<\/li>\r\n \t<li>In question 4, you used technology to create and manipulate a graph of categorical data from a frequency table.<\/li>\r\n \t<li>And in questions 3 - 5, you read a frequency table, a bar graph, and a pie chart to make observations about categorical data.<\/li>\r\n<\/ul>\r\nYou've seen in this section that frequency tables, bar graphs, and pie charts are all good tools for visualizing categorical data. If you feel comfortable with these ideas, it's time to move on!","rendered":"<div class=\"textbox learning-objectives\">\n<h3>goals for this section<\/h3>\n<p>After completing this section, you should feel comfortable performing these skills.<\/p>\n<ul>\n<li><a href=\"#Categorical Variables\">Determine which variables are categorical from raw data.<\/a><\/li>\n<li><a href=\"#Frequency Tables\">Read and interpret a frequency table<\/a><\/li>\n<li><a href=\"#create frequency table\">Use a data analysis tool to create a frequency table from a dataset<\/a><\/li>\n<li><a href=\"#Bar Graphs\">Read and interpret a bar graph.<\/a><\/li>\n<li><a href=\"#CreateBar\">Use technology to create a bar graph from a dataset.<\/a><\/li>\n<li><a href=\"#Pie Charts\">Read and interpret a pie chart.<\/a><\/li>\n<li><a href=\"#CreatePie\">Use technology to create a pie chart from a dataset.<\/a><\/li>\n<\/ul>\n<p>Click on a skill above to jump to its location in this section.<\/p>\n<\/div>\n<p>When describing data using graphical representations, certain variables in the data are appropriate for certain visualizations. To prepare for the upcoming activity, you will need to identify variables that would be appropriate for bar graphs and pie charts and answer research questions by reading bar graphs and pie charts. To do this, you will need to be able to determine which variables in a dataset are categorical, understand how frequency tables are formed, and understand how bar graphs and pie charts are formed.<\/p>\n<h2>Categorical Variables<\/h2>\n<p><span style=\"background-color: #ffff00;\">In a previous section (1C)<\/span>, you learned the difference between categorical and quantitative variables. Let&#8217;s take a moment to refresh that information before diving into a deep exploration of categorical variables.<\/p>\n<div class=\"textbox examples\">\n<h3>Recall<\/h3>\n<p>What is the distinguishing feature of a categorical variable? That is, how can we tell a categorical variable apart from a quantitative variable?<\/p>\n<p style=\"text-align: left;\">Core Skill:<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q244835\">Identify a variable as\u00a0categorical or quantitative<\/span><\/p>\n<div id=\"q244835\" class=\"hidden-answer\" style=\"display: none\">\n<p>A variable is classified as <strong>categorical<\/strong> if it places an individual into one of several groups.<\/p>\n<ul>\n<li>Eye color, zip code, education level, and gender are examples of categorical data.<\/li>\n<\/ul>\n<p>A variable is classified as <strong>quantitative<\/strong> if it takes numerical values that can be manipulated arithmetically.<\/p>\n<ul>\n<li>Height, cost, exam scores, and temperature are examples of quantitative data.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p>Practice identifying categorical variables in a list in the interactive example. Then, for the data table that follows, identify the categorical variables to answer Question 1.<\/p>\n<div class=\"textbox exercises\">\n<h3>Interactive Example<\/h3>\n<p>Which variable(s) in the list below are categorical?<\/p>\n<p style=\"padding-left: 30px;\"><em>Age<\/em>, <em>marital status<\/em>, <em>number of children in the household<\/em>, <em>zip code<\/em>,<em> income<\/em>, <em>education level<\/em><\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q129517\">Show Answer<\/span><\/p>\n<div id=\"q129517\" class=\"hidden-answer\" style=\"display: none\">\n<p>The categorical variables are: <em>marital status<\/em>, <em>zip code<\/em>, <em>education level<\/em> since we cannot do arithmetic on these observations.<\/p>\n<p><em>Age,\u00a0<\/em><em>Number of children in the household<\/em>, and\u00a0<em>income<\/em> are quantitative since we could find a numerical average of each of these.<\/p>\n<p>Note that <em>income<\/em> could be made categorical by collecting data in categories of income levels: under 20k, 21k &#8211; 50k, 51k &#8211; 100k, etc.\u00a0<\/div>\n<\/div>\n<\/div>\n<p>Now it&#8217;s your turn to practice what you know by looking at a real dataset obtained from a survey and displayed in the table below. Read the information given about the dataset and its variables, then answer the questions that follow.<\/p>\n<h3 id=\"Categorical Variables\">Identify Categorical Variables in a Dataset<\/h3>\n<div class=\"textbox tryit\">\n<h3>identifying characteristics of a categorical variable<\/h3>\n<p><strong><span style=\"background-color: #99cc00;\">[Perspective Video &#8212; a 3-instructors video illustrating the identifying characteristics of a categorical variable in raw data.)<\/span><\/strong><\/p>\n<\/div>\n<p>In 2013, students of the statistics class at FSEV UK, a Slovakian University, were asked to invite their friends to participate in a survey<a class=\"footnote\" title=\"Young people survey. (2016, December 6). Kaggle. Retrieved from https:\/\/www.kaggle.com\/miroslavsabo\/young-people-survey\" id=\"return-footnote-250-1\" href=\"#footnote-250-1\" aria-label=\"Footnote 1\"><sup class=\"footnote\">[1]<\/sup><\/a>. Data for the first 15 out of 1,007 young people who completed the survey are displayed below.<\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: center;\" colspan=\"8\"><strong>Young People Survey<\/strong><strong><br \/>\n<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\"><strong>Alcohol<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>Age<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>Height<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>Punctuality<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>Number of siblings<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>Enjoy Music 1=strongly disagree, 5=strongly agree<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>Internet usage<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>Left \u2013 right handed<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">drink a lot<\/td>\n<td style=\"text-align: center;\">20<\/td>\n<td style=\"text-align: center;\">163<\/td>\n<td style=\"text-align: center;\">I am always on time<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">5<\/td>\n<td style=\"text-align: center;\">few hours a day<\/td>\n<td style=\"text-align: center;\">right handed<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">drink a lot<\/td>\n<td style=\"text-align: center;\">19<\/td>\n<td style=\"text-align: center;\">163<\/td>\n<td style=\"text-align: center;\">I am often early<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">4<\/td>\n<td style=\"text-align: center;\">few hours a day<\/td>\n<td style=\"text-align: center;\">right handed<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">drink a lot<\/td>\n<td style=\"text-align: center;\">20<\/td>\n<td style=\"text-align: center;\">176<\/td>\n<td style=\"text-align: center;\">I am often running late<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">5<\/td>\n<td style=\"text-align: center;\">few hours a day<\/td>\n<td style=\"text-align: center;\">right handed<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">drink a lot<\/td>\n<td style=\"text-align: center;\">22<\/td>\n<td style=\"text-align: center;\">172<\/td>\n<td style=\"text-align: center;\">I am often early<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">5<\/td>\n<td style=\"text-align: center;\">most of the day<\/td>\n<td style=\"text-align: center;\">right handed<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">social drinker<\/td>\n<td style=\"text-align: center;\">20<\/td>\n<td style=\"text-align: center;\">170<\/td>\n<td style=\"text-align: center;\">I am always on time<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">5<\/td>\n<td style=\"text-align: center;\">few hours a day<\/td>\n<td style=\"text-align: center;\">right handed<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">never<\/td>\n<td style=\"text-align: center;\">20<\/td>\n<td style=\"text-align: center;\">186<\/td>\n<td style=\"text-align: center;\">I am often early<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">5<\/td>\n<td style=\"text-align: center;\">few hours a day<\/td>\n<td style=\"text-align: center;\">right handed<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">social drinker<\/td>\n<td style=\"text-align: center;\">20<\/td>\n<td style=\"text-align: center;\">177<\/td>\n<td style=\"text-align: center;\">I am often early<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">5<\/td>\n<td style=\"text-align: center;\">less than an hour a day<\/td>\n<td style=\"text-align: center;\">right handed<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">drink a lot<\/td>\n<td style=\"text-align: center;\">19<\/td>\n<td style=\"text-align: center;\">184<\/td>\n<td style=\"text-align: center;\">I am always on time<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">5<\/td>\n<td style=\"text-align: center;\">few hours a day<\/td>\n<td style=\"text-align: center;\">right handed<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">social drinker<\/td>\n<td style=\"text-align: center;\">18<\/td>\n<td style=\"text-align: center;\">166<\/td>\n<td style=\"text-align: center;\">I am often early<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">5<\/td>\n<td style=\"text-align: center;\">few hours a day<\/td>\n<td style=\"text-align: center;\">right handed<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">drink a lot<\/td>\n<td style=\"text-align: center;\">19<\/td>\n<td style=\"text-align: center;\">174<\/td>\n<td style=\"text-align: center;\">I am often running late<\/td>\n<td style=\"text-align: center;\">3<\/td>\n<td style=\"text-align: center;\">5<\/td>\n<td style=\"text-align: center;\">few hours a day<\/td>\n<td style=\"text-align: center;\">right handed<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">social drinker<\/td>\n<td style=\"text-align: center;\">19<\/td>\n<td style=\"text-align: center;\">175<\/td>\n<td style=\"text-align: center;\">I am often early<\/td>\n<td style=\"text-align: center;\">2<\/td>\n<td style=\"text-align: center;\">5<\/td>\n<td style=\"text-align: center;\">less than an hour a day<\/td>\n<td style=\"text-align: center;\">left handed<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">never<\/td>\n<td style=\"text-align: center;\">17<\/td>\n<td style=\"text-align: center;\">176<\/td>\n<td style=\"text-align: center;\">I am often running late<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">5<\/td>\n<td style=\"text-align: center;\">few hours a day<\/td>\n<td style=\"text-align: center;\">right handed<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">social drinker<\/td>\n<td style=\"text-align: center;\">24<\/td>\n<td style=\"text-align: center;\">168<\/td>\n<td style=\"text-align: center;\">I am often running late<\/td>\n<td style=\"text-align: center;\">10<\/td>\n<td style=\"text-align: center;\">5<\/td>\n<td style=\"text-align: center;\">few hours a day<\/td>\n<td style=\"text-align: center;\">right handed<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">social drinker<\/td>\n<td style=\"text-align: center;\">19<\/td>\n<td style=\"text-align: center;\">165<\/td>\n<td style=\"text-align: center;\">I am often early<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">5<\/td>\n<td style=\"text-align: center;\">few hours a day<\/td>\n<td style=\"text-align: center;\">right handed<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">social drinker<\/td>\n<td style=\"text-align: center;\">22<\/td>\n<td style=\"text-align: center;\">175<\/td>\n<td style=\"text-align: center;\">I am often early<\/td>\n<td style=\"text-align: center;\">1<\/td>\n<td style=\"text-align: center;\">5<\/td>\n<td style=\"text-align: center;\">most of the day<\/td>\n<td style=\"text-align: center;\">right handed<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The following eight variables are included in the dataset. The variable names are presented in <em>italics<\/em>, followed by a brief description. <span style=\"background-color: #ffff00;\">You may recall from Forming Connections in (1D) that this is often called a\u00a0<em>data dictionary<\/em>.<\/span><\/p>\n<ul>\n<li><em>Alcohol<\/em>: \u201cnever,\u201d \u201csocial drinker,\u201d or \u201cdrink a lot\u201d<\/li>\n<li><em>Age<\/em>: Years<\/li>\n<li><em>Height<\/em>: Height in centimeters (cm)<\/li>\n<li><em>Punctuality<\/em>: \u201cI am often early,\u201d \u201cI am often on time,\u201d or \u201cI am often running late\u201d<\/li>\n<li><em>Number of siblings <\/em><\/li>\n<li><em>Enjoy music<\/em>: Participants were asked \u201cDo you enjoy music?\u201d and reported on a 5-point Likert scale: strongly disagree = 1, strongly agree = 5<\/li>\n<li><em>Internet usage<\/em>: \u201cno time at all,\u201d \u201cless than an hour a day,\u201d \u201cfew hours a day,\u201d or \u201cmost of the day\u201d<\/li>\n<li><em>Left &#8211; right handed<\/em><\/li>\n<\/ul>\n<div class=\"textbox key-takeaways\">\n<h3>Question 1<\/h3>\n<p><iframe loading=\"lazy\" id=\"ohm240631\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=240631&theme=oea&iframe_resize_id=ohm240631&show_question_numbers\" width=\"100%\" height=\"150\"><\/iframe><\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q576725\">Hint<\/span><\/p>\n<div id=\"q576725\" class=\"hidden-answer\" style=\"display: none\">Recall that a categorical variable is a variable that places an individual into one of several groups.<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<h2>Frequency Tables<\/h2>\n<p>A <strong>frequency table <\/strong>lists the number of observations (the <strong>frequency<\/strong>) of each unique value of a categorical variable. The frequency is commonly referred to as the <strong>count<\/strong>. See the example below, which illustrates a partially complete, simple frequency table for a survey in which 20 people were asked to answer a question by choosing one of four responses: strongly disagree, disagree, agree, or strongly agree.<\/p>\n<table style=\"border-collapse: collapse; width: 44.444%;\">\n<tbody>\n<tr>\n<td style=\"width: 33.3333%; text-align: center;\">Variable Name<\/td>\n<td style=\"width: 33.3333%; text-align: center;\">Frequency (number of times each response appears in the dataset)<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.3333%;\">Strongly disagree<\/td>\n<td style=\"width: 33.3333%; text-align: center;\">2<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.3333%;\">Disagree<\/td>\n<td style=\"width: 33.3333%; text-align: center;\">5<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.3333%;\">Agree<\/td>\n<td style=\"width: 33.3333%; text-align: center;\">9<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 33.3333%;\">Strongly agree<\/td>\n<td style=\"width: 33.3333%; text-align: center;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"textbox exercises\">\n<h3>Interactive example<\/h3>\n<p>For the frequency table above, answer the following questions<\/p>\n<p>a) If 20 responses were collected in the survey, how many people responded with &#8220;Strongly agree?&#8221;<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q596200\">Show Answer<\/span><\/p>\n<div id=\"q596200\" class=\"hidden-answer\" style=\"display: none\">There are 4 &#8220;Strongly agree&#8221; responses. I.e., if there are 9 + 5 + 2 = 16 responses showing, and if the total frequency is 20, then 20 &#8211; 16 = 4. <\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>b) What is the total frequency for the table?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q276251\">Show Answer<\/span><\/p>\n<div id=\"q276251\" class=\"hidden-answer\" style=\"display: none\">20. There were 20 total responses, which represents the total frequency.<\/div>\n<\/div>\n<\/div>\n<h3 id=\"Frequency Tables\">Read and interpret a frequency table<\/h3>\n<p>Frequency tables often include a column for the relative frequency. The <strong>relative frequency<\/strong> represents the proportion of observations that are in a particular category and can be expressed as a decimal or a percentage. To find relative frequency, divide the count of a particular category by the sum of all the counts. See the recall box below for a refresher on how to convert ratios to proportions and percentages. Also see the Student Resources: <a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/Stats+Exemplar\/Resource+-+Fractions%2C+Decimals%2C+Percentages.pdf\"><em>Fractions, Decimals, Percentages<\/em><\/a> and\u00a0<em><a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/Stats+Exemplar\/Resource+-+Ratios+and+Fractions.pdf\">Ratios and Fractions<\/a>.<\/em><\/p>\n<div class=\"textbox examples\">\n<h3>Recall<\/h3>\n<p>When calculating relative frequencies, you&#8217;ll need to convert a proportion to a percent. You&#8217;ve probably done this before, so this should be a refresher.<\/p>\n<p>Click the link below to see how to convert the fraction [latex]\\dfrac{2}{15}[\/latex] to a proportion and then to a percentage.<\/p>\n<p>Core Skill: <\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q177645\">Convert a fraction to a decimal or a percent<\/span><\/p>\n<div id=\"q177645\" class=\"hidden-answer\" style=\"display: none\">\n<ul>\n<li>To convert a ratio (a fraction) to a proportion in decimal form, divide the numerator by the denominator in a calculator. The result will be a number in decimal form.<\/li>\n<li>To convert the proportion from decimal form to a percentage, multiply it by 100. That is, first locate the decimal point in the proportion, then move it two places to the right.<\/li>\n<\/ul>\n<p>Ex. In the table below, we see that [latex]\\dfrac{2}{15} = 0.1\\bar{3}[\/latex].<\/p>\n<p>To convert [latex]0.1\\bar{3}[\/latex] to a percent, move the decimal two places to the right to obtain [latex]13.\\bar{3}[\/latex] (the bar over the 3 indicates that the 3 repeats without terminating). In the table below, the number is rounded to the hundredths place (two decimal places) as 13.33%.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox tryit\">\n<h3>creating a frequency table<\/h3>\n<p><strong><span style=\"background-color: #99cc00;\">[Worked Example &#8212; a 3-instructors worked example of creating a frequency table for a categorical variable identified from a data table. )<\/span><\/strong><\/p>\n<\/div>\n<p>The following frequency table displays the frequency and relative frequency (as a decimal and a percentage) of the categorical variable <em>Alcohol <\/em>for the first 15 young people who responded to the survey.<\/p>\n<table style=\"width: 437px; height: 80px;\">\n<tbody>\n<tr style=\"height: 20px;\">\n<td style=\"width: 82.75px; height: 20px; text-align: center;\"><strong>Alcohol <\/strong><\/td>\n<td style=\"width: 64.7344px; height: 20px; text-align: center;\"><strong>Frequency<\/strong><\/td>\n<td style=\"width: 146.844px; height: 20px; text-align: center;\"><strong>Relative Frequency<\/strong><\/td>\n<td style=\"width: 91.6719px; height: 20px; text-align: center;\"><strong>Percent\u00a0<\/strong><strong>(%)<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 29px;\">\n<td style=\"width: 82.75px; height: 21px; text-align: center;\"><strong>Never<\/strong><\/td>\n<td style=\"width: 64.7344px; height: 21px; text-align: center;\">2<\/td>\n<td style=\"width: 146.844px; height: 21px; text-align: center;\">2\/15 = 0.1333<\/td>\n<td style=\"width: 91.6719px; height: 21px; text-align: center;\">13.33<\/td>\n<\/tr>\n<tr style=\"height: 49px;\">\n<td style=\"width: 82.75px; height: 21px; text-align: center;\"><strong>Social drinker<\/strong><\/td>\n<td style=\"width: 64.7344px; height: 21px; text-align: center;\"><\/td>\n<td style=\"width: 146.844px; height: 21px; text-align: center;\"><\/td>\n<td style=\"width: 91.6719px; height: 21px; text-align: center;\"><\/td>\n<\/tr>\n<tr style=\"height: 10px;\">\n<td style=\"width: 82.75px; height: 18px; text-align: center;\"><strong>Drink a lot<\/strong><\/td>\n<td style=\"width: 64.7344px; height: 18px; text-align: center;\"><\/td>\n<td style=\"width: 146.844px; height: 18px; text-align: center;\"><\/td>\n<td style=\"width: 91.6719px; height: 18px; text-align: center;\"><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"textbox key-takeaways\">\n<h3>question 2<\/h3>\n<p>Complete the frequency table above. To find the frequency, look back at the first data table. Round relative frequencies to four decimal places and the corresponding percentages to two decimal places.<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q849602\">Hint<\/span><\/p>\n<div id=\"q849602\" class=\"hidden-answer\" style=\"display: none\">To find the relative frequency, divide the frequency for each category by the total frequency. To find the percent column, you will convert the relative frequencies to percentages by multiplying by 100. See Resource <a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/Stats+Exemplar\/Resource+-+Rounding+and+Estimation.pdf\" target=\"_blank\" rel=\"noopener\"><strong>Rounding and Estimation<\/strong><\/a>, if needed.<\/div>\n<\/div>\n<\/div>\n<h3>Use technology to create a frequency table from a dataset<\/h3>\n<p id=\"create frequency table\">Displaying frequency tables for small datasets might be feasible by hand, but we need technology to display frequency tables for larger datasets.<\/p>\n<p>Let\u2019s use technology to create a frequency table to understand the variable <em>Enjoy Music<\/em> for all 1,007 students included in the survey. Follow these steps:<\/p>\n<div class=\"textbox\">\n<p>Go to the data analysis tool\u00a0 <em>Describing and Exploring Categorical Data<\/em>\u00a0 at\u00a0<a href=\"https:\/\/dcmathpathways.shinyapps.io\/EDA_categorical\/\" target=\"_blank\" rel=\"noopener\">https:\/\/dcmathpathways.shinyapps.io\/EDA_categorical\/<\/a><\/p>\n<p style=\"padding-left: 30px;\">Step 1) Select the\u00a0<strong>One Categorical Variable<\/strong> tab.<\/p>\n<p style=\"padding-left: 30px;\">Step 2)\u00a0Locate the dropdown under <strong>Enter Data<\/strong>\u00a0and select <strong>From Textbook<\/strong>.<\/p>\n<p style=\"padding-left: 30px;\">Step 3) Locate the dropdown under <strong>Dataset<\/strong> and select <strong>Young Adults: Enjoy Music<\/strong>.\u00a0 The frequency table will appear to the right. It will be\u00a0\u00a0easier to read if the categories are presented in order. Follow Steps 4 and 5 below to rearrange it if needed.<\/p>\n<p>To rearrange the frequency table in numerical order from 1 to 5:<\/p>\n<p style=\"padding-left: 30px;\">Step 4) Select the <strong>Customize Order<\/strong> box under <strong>Options<\/strong>.<\/p>\n<p style=\"padding-left: 30px;\">Step 5) Locate the <strong>Choose Order of Categories<\/strong> box and sequentially select 1, 2, 3, 4, and 5.<\/p>\n<\/div>\n<p>Refer to the frequency table you just created to answer Questions 3 and 4.<\/p>\n<div class=\"textbox key-takeaways\">\n<h3>question 3<\/h3>\n<p>How many surveyed young adults strongly disagreed that they enjoy music?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q975895\">Hint<\/span><\/p>\n<div id=\"q975895\" class=\"hidden-answer\" style=\"display: none\">Hint: Strongly disagree = (1)<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>question 4<\/h3>\n<p>What percentage of young adults surveyed strongly agreed that they enjoy music?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q354943\">Hint<\/span><\/p>\n<div id=\"q354943\" class=\"hidden-answer\" style=\"display: none\">Hint: Strongly agree = (5)<\/div>\n<\/div>\n<\/div>\n<p>When exploring categorical data, it is helpful to convert the data from tables into charts or graphs. Bar graphs and pie charts provide visual summaries of data that help us quickly identify how the individual category frequencies relate to one another and to the total count.<\/p>\n<h2 id=\"Bar Graphs\">Bar Graphs<\/h2>\n<p>One of the most commonly used graphs for visualizing the distribution of a categorical variable is a bar graph. In a <strong>bar graph<\/strong>, categories are represented by bars that are separated from each other. The bars can be vertical or horizontal, and the height (or length) of each bar represents the measure of the data in each category. Bars can represent frequencies, relative frequencies (proportion), or percentages.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1688\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5738\/2021\/10\/19204205\/Screen-Shot-2022-01-19-at-3.41.46-PM.png\" alt=\"The bar graph is titled &quot;Vertical Bar Graph&quot; with the x-axis labeled &quot;Eye Color&quot;, and the y-axis labeled &quot;Height (in inches)&quot;. The height (in inches) ranges from 0-80 in increments of 10. The eye color and their heights (in inches) are as follows: Blue 48, Brown 72, Grey 59, Hazel 76, and Green 63.\" width=\"403\" height=\"243\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1689\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5738\/2021\/10\/19204355\/Screen-Shot-2022-01-19-at-3.43.40-PM.png\" alt=\"The bar graph is titled &quot;Horizontal Bar Graph&quot; with the x-axis labeled &quot;Height (in inches)&quot;, and the y-axis labeled &quot;Eye Color&quot;. The height (in inches) ranges from 0-80 in increments of 10. The eye color and their heights (in inches) are as follows: Blue 48, Brown 72, Grey 59, Hazel 76, and Green 63.\" width=\"444\" height=\"238\" \/><\/p>\n<h3 id=\"Bar Graphs\">Read and interpret a bar graph<\/h3>\n<p>The bar graph below displays the number of cones each of a small ice cream shop sold on the 4th of July. Note that the counts (numbers of cones) are listed on the vertical axis while each flavor sold is listed along the horizontal axis. Examine the graph, then answer the questions in the Interactive Example that follows.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2958 size-full\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5738\/2021\/10\/08195223\/IceCream_Hist1.png\" alt=\"A bar graph entitled &quot;Ice Cream Sales.&quot; Butter Pecan has a count of less than 10. Strawberry has a count of more than 50 and less than 60. Neapolitan has a count of 30. Vanilla has a count of 45. Chocolate has a count of 50. Cookies and Cream has a count of 30. Mint Chocolate chip has a count of 60. Other has a count between 20 and 30.\" width=\"832\" height=\"350\" \/><\/p>\n<div class=\"textbox exercises\">\n<h3>Interactive example<\/h3>\n<p>Use the Ice Cream Flavors bar graph above to answer these questions.<\/p>\n<p>a)\u00a0 Which flavor sold the fewest number of cones?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q901078\">Show Answer<\/span><\/p>\n<div id=\"q901078\" class=\"hidden-answer\" style=\"display: none\">Butter Pecan<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n<p>b) About how many cones of Neapolitan ice cream were sold?\u00a0<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q110753\">Show Answer<\/span><\/p>\n<div id=\"q110753\" class=\"hidden-answer\" style=\"display: none\">30<\/div>\n<\/div>\n<\/div>\n<p>Now that you have had a chance to become familiar with this categorical visualization, follow the directions below to use technology to create a bar graph for a real dataset.<\/p>\n<h3 id=\"CreateBar\">Use technology to create a bar graph from a dataset<\/h3>\n<p>Recall the frequency table you created earlier in this section using the <em>Describing and Exploring Categorical Data tool.\u00a0<\/em>When you used the technology tool to create the frequency table, a bar graph was also created on that page. Let&#8217;s go back to the tool to explore the bar graph. If you still have the tool open for this dataset, just follow steps 4 and 5 below to view the bar graph.<\/p>\n<div class=\"textbox\">\n<p>Go to the data analysis tool\u00a0 <em>Describing and Exploring Categorical Data<\/em>\u00a0 at\u00a0 \u00a0<a href=\"https:\/\/dcmathpathways.shinyapps.io\/EDA_categorical\/\" target=\"_blank\" rel=\"noopener\">https:\/\/dcmathpathways.shinyapps.io\/EDA_categorical\/<\/a><\/p>\n<p style=\"padding-left: 30px;\">Step 1) Select the\u00a0<strong>One Categorical Variable<\/strong> tab.<\/p>\n<p style=\"padding-left: 30px;\">Step 2)\u00a0Locate the dropdown under <strong>Enter Data<\/strong> and select <strong>From Textbook<\/strong>.<\/p>\n<p style=\"padding-left: 30px;\">Step 3) Locate the dropdown under <strong>Dataset<\/strong> and select <strong>Young Adults: Enjoy Music<\/strong>.<\/p>\n<p>See the bar graph under the frequency table on the tool page. You can change the appearance of the graph using the<strong>\u00a0Options\u00a0<\/strong>selections. You can show counts or percentages on the vertical axis or in the bars, change the bars from vertical to horizontal, customize order, and even change the color of the bars in the\u00a0<strong>Modify\/Include\u00a0<\/strong>section. Let&#8217;s explore how to change the bars from vertical to horizontal and then change the horizontal axis from Count to Percent (%).<\/p>\n<p style=\"padding-left: 30px;\">Step 4)\u00a0<span style=\"font-size: 1em;\">Click the <strong>Horizontal Bars<\/strong> box to change the perspective of the graph from counts as bar-heights to bar-lengths. Note how the Count range switches from the vertical axis to the horizontal axis.\u00a0<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"font-size: 1em;\">Step 5) Click the <strong>Show Percent<\/strong> box to change the heights (or lengths of horizontal bars) from counts to percentages. Note how the Count range switches to Percent (%).\u00a0<\/span><\/p>\n<\/div>\n<p>Take a moment to explore switching these options back and forth to see how the graph changes then answer Question 5 below.<\/p>\n<div class=\"textbox key-takeaways\">\n<h3>question 5<\/h3>\n<p><iframe loading=\"lazy\" id=\"ohm240591\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=240591&theme=oea&iframe_resize_id=ohm240591&show_question_numbers\" width=\"100%\" height=\"150\"><\/iframe><\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q287570\">Hint<\/span><\/p>\n<div id=\"q287570\" class=\"hidden-answer\" style=\"display: none\">Hint: The heights of the bars represent the measure of the frequency, relative frequency, or percentage of surveyed young adults for each music rating.<\/div>\n<\/div>\n<\/div>\n<h2 id=\"Pie Charts\">Pie Charts<\/h2>\n<p>Another common graph used for displaying the distribution of categorical data is a pie chart. In a <strong>pie chart<\/strong>, categories are represented by wedges in a circle and are proportional in size to the percentage of individuals\/items in each category.\u00a0There are several ways to present pie chart data visually. A pie chart may include all the information needed to read it within each wedge or they may provided some image in the chart and some in a key off to the side.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1691\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5738\/2021\/10\/19210226\/Screen-Shot-2022-01-19-at-4.01.15-PM.png\" alt=\"The pie chart is titled &quot;Students in a Course&quot; and includes 4 sections: Freshman (35%), Sophomore (29%), Junior (23%), and Senior (13%). These percentages are included inside the pie chart.\" width=\"449\" height=\"267\" \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1692\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5738\/2021\/10\/19210253\/Screen-Shot-2022-01-19-at-4.02.12-PM.png\" alt=\"The pie chart is titled &quot;Students in a Course&quot; and includes 4 sections: Freshman (35%), Sophomore (29%), Junior (23%), and Senior (13%). In this pie chart, only the percentages are included inside the pie chart with the student classifications listed outside of the pie chart in a legend.\" width=\"411\" height=\"246\" \/><\/p>\n<h3 id=\"Pie Charts\">Read and interpret a pie chart<\/h3>\n<p>Pie charts are useful for showing percentages (parts of a whole) at some particular instance in time. For example, the following chart displays flavors of ice cream sold at an ice cream shop as a percentage of all ice cream sales on July 4th. This chart contains the same information as the bar chart does above, but shows percentages rather than counts.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1801 size-full\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5738\/2021\/10\/24221019\/Screen-Shot-2022-01-24-at-5.09.54-PM.png\" alt=\"The pie chart is titled &quot;Ice Cream Sales&quot; and is divided into 8 sections: Butter Pecan (2%), Strawberry (18%), Neapolitan (10%), Vanilla (15%), Chocolate (17%), Cookies and Cream (10%), Mint Chocolate Chip (20%), Other (8%).\" width=\"1736\" height=\"914\" \/><\/p>\n<div class=\"textbox exercises\">\n<h3>Interactive example<\/h3>\n<p>Use the chart above to answer the following questions.<\/p>\n<p>a) What flavor made up the largest percentage of ice cream sales?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q140681\">Show Answer<\/span><\/p>\n<div id=\"q140681\" class=\"hidden-answer\" style=\"display: none\">Mint Chocolate Chip<\/div>\n<\/div>\n<p>b) What percent of sales was attributed to strawberry ice cream?<\/p>\n<p style=\"padding-left: 30px;\">\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q806070\">Show Answer<\/span><\/p>\n<div id=\"q806070\" class=\"hidden-answer\" style=\"display: none\">18%<\/div>\n<\/div>\n<\/div>\n<h3 id=\"CreatePie\">Use technology to create a pie chart from a dataset<\/h3>\n<p>When you used the <em>Describing and Exploring Categorical Data\u00a0<\/em>data tool to create the frequency table and bar graph, you also had the option to create a pie chart. Let&#8217;s do that now. If you still have the tool open, skip to Step 4 below.<\/p>\n<div class=\"textbox\">\n<p>Go to the data analysis tool\u00a0 <em>Describing and Exploring Categorical Data<\/em>\u00a0 at\u00a0 \u00a0<a href=\"https:\/\/dcmathpathways.shinyapps.io\/EDA_categorical\/\" target=\"_blank\" rel=\"noopener\">https:\/\/dcmathpathways.shinyapps.io\/EDA_categorical\/<\/a><\/p>\n<p style=\"padding-left: 30px;\">Step 1) Select the\u00a0<strong>One Categorical Variable<\/strong> tab.<\/p>\n<p style=\"padding-left: 30px;\">Step 2)\u00a0Locate the dropdown under <strong>Enter Data<\/strong> and select <strong>From Textbook<\/strong>.<\/p>\n<p style=\"padding-left: 30px;\">Step 3) Locate the dropdown under <strong>Dataset<\/strong> and select <strong>Young Adults: Enjoy Music<\/strong>.<\/p>\n<p style=\"padding-left: 30px;\">Step 4)\u00a0<span style=\"font-size: 1em;\">Under the\u00a0<strong>Additional Plots<\/strong> section, select <strong>Pie Chart<\/strong>.\u00a0<\/span>Scroll down to see the pie chart on the page under the bar graph.<\/p>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>question 6<\/h3>\n<p><iframe loading=\"lazy\" id=\"ohm240593\" class=\"resizable\" src=\"https:\/\/ohm.lumenlearning.com\/multiembedq.php?id=240593&theme=oea&iframe_resize_id=ohm240593&show_question_numbers\" width=\"100%\" height=\"150\"><\/iframe><\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q282030\">Hint<\/span><\/p>\n<div id=\"q282030\" class=\"hidden-answer\" style=\"display: none\">Make sure that One Categorical Variable and the correct dataset (Young Adults: Enjoy Music) are selected.<\/div>\n<\/div>\n<\/div>\n<p>It&#8217;s difficult to visualize a summary of the <em>Enjoy music <\/em>categories since just one or two of them dominate the chart. Let&#8217;s leave the tool now and explore another one of the variables from the dataset: <em>Punctuality<\/em>. The following pie chart displays the distribution of the categorical variable <em>Punctuality<\/em>. Use this pie chart to answer Questions 6 and 7 below.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1109\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/5738\/2021\/10\/12005123\/3A-Pie-Chart-67.png\" alt=\"A pie chart of young adults punctuality. The section for &quot;I am often early&quot; is 38.5%. The section for &quot;I am always on time&quot; is 34.6%. The section for &quot;I am often running late&quot; is 26.9%.\" width=\"504\" height=\"324\" \/><\/p>\n<div class=\"textbox key-takeaways\">\n<h3>question 7<\/h3>\n<p>According to the pie chart, what percentage of surveyed young adults said they are often running late?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q100546\">Hint<\/span><\/p>\n<div id=\"q100546\" class=\"hidden-answer\" style=\"display: none\">Put Answer Here<\/div>\n<\/div>\n<\/div>\n<div class=\"textbox key-takeaways\">\n<h3>question 8<\/h3>\n<p>What percentage of surveyed young adults said they are often early or always on time?<\/p>\n<div class=\"qa-wrapper\" style=\"display: block\"><span class=\"show-answer collapsed\" style=\"cursor: pointer\" data-target=\"q899480\">Hint<\/span><\/p>\n<div id=\"q899480\" class=\"hidden-answer\" style=\"display: none\">What do <em>you<\/em> think?<\/div>\n<\/div>\n<\/div>\n<h2>Summary<\/h2>\n<p>In this preview section, you&#8217;ve had a chance to practice the tasks that will be essential to forming deeper connections in the next activity. This is a good time to sum it all up before moving on.<\/p>\n<ul>\n<li>In question 1, you identified categorical variables from a list of variables appearing in raw data.<\/li>\n<li>In question 2, you completed a frequency table from raw data by hand.<\/li>\n<li>In question 3, you used technology to create a frequency table from raw data.<\/li>\n<li>In question 4, you used technology to create and manipulate a graph of categorical data from a frequency table.<\/li>\n<li>And in questions 3 &#8211; 5, you read a frequency table, a bar graph, and a pie chart to make observations about categorical data.<\/li>\n<\/ul>\n<p>You&#8217;ve seen in this section that frequency tables, bar graphs, and pie charts are all good tools for visualizing categorical data. If you feel comfortable with these ideas, it&#8217;s time to move on!<\/p>\n<hr class=\"before-footnotes clear\" \/><div class=\"footnotes\"><ol><li id=\"footnote-250-1\">Young people survey. (2016, December 6). Kaggle. Retrieved from https:\/\/www.kaggle.com\/miroslavsabo\/young-people-survey <a href=\"#return-footnote-250-1\" class=\"return-footnote\" aria-label=\"Return to footnote 1\">&crarr;<\/a><\/li><\/ol><\/div>","protected":false},"author":25777,"menu_order":4,"template":"","meta":{"_candela_citation":"[]","CANDELA_OUTCOMES_GUID":"","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-250","chapter","type-chapter","status-publish","hentry"],"part":3,"_links":{"self":[{"href":"https:\/\/courses.lumenlearning.com\/lumen-danacenter-statsmockup\/wp-json\/pressbooks\/v2\/chapters\/250","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.lumenlearning.com\/lumen-danacenter-statsmockup\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/courses.lumenlearning.com\/lumen-danacenter-statsmockup\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/lumen-danacenter-statsmockup\/wp-json\/wp\/v2\/users\/25777"}],"version-history":[{"count":113,"href":"https:\/\/courses.lumenlearning.com\/lumen-danacenter-statsmockup\/wp-json\/pressbooks\/v2\/chapters\/250\/revisions"}],"predecessor-version":[{"id":2422,"href":"https:\/\/courses.lumenlearning.com\/lumen-danacenter-statsmockup\/wp-json\/pressbooks\/v2\/chapters\/250\/revisions\/2422"}],"part":[{"href":"https:\/\/courses.lumenlearning.com\/lumen-danacenter-statsmockup\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/courses.lumenlearning.com\/lumen-danacenter-statsmockup\/wp-json\/pressbooks\/v2\/chapters\/250\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/courses.lumenlearning.com\/lumen-danacenter-statsmockup\/wp-json\/wp\/v2\/media?parent=250"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/lumen-danacenter-statsmockup\/wp-json\/pressbooks\/v2\/chapter-type?post=250"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/lumen-danacenter-statsmockup\/wp-json\/wp\/v2\/contributor?post=250"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/lumen-danacenter-statsmockup\/wp-json\/wp\/v2\/license?post=250"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}