From the course: CompTIA Data+ (DA0-002) Cert Prep
Discrete vs. continuous data
From the course: CompTIA Data+ (DA0-002) Cert Prep
Discrete vs. continuous data
- [Instructor] Another way of thinking about our data is whether it comes in discrete or continuous form. Discrete data is data that may take on values that come from a limited set of possibilities. Now, these possibilities may be numbers or they may be text-based categories such as country of birth, vehicle color, or a person's favorite baseball team. Continuous data, on the other hand, is data that may take on any possible numeric value within a range. Now, there are infinite possibilities for continuous data elements. For example, consider the height of an adult person measured in inches, and human beings have a normal height distribution ranging from about 55 inches to around 85 inches. Within that range, an individual person can take on an infinite number of possible values. For example, I could be 71 inches tall, 71.5 inches tall, 71.52 inches tall, or even 71.52481 inches tall. We could come up with as many possible values as we'd like. One quick shortcut for identifying whether a numeric value is discrete or continuous is thinking about how you gather the data. In cases where you're accounting things, the data is generally discrete. If you're counting the number of people entering a stadium, you're going to come up with a whole number, and that number is going to be somewhere between zero and the number of people who fit in the stadium. It doesn't make any sense to have a decimal value because a half a person can't enter the stadium. On the other hand, in cases where you're measuring something, you're generally going to have a continuous value because the number of decimal places you have will depend upon the precision of your measurement. Examples of these continuous values include measuring the weight of an object or the air temperature. Now, when you have a discrete variable that uses text values, this is a situation known as categorical data. Categorical data types are used when you're grouping information into a set of buckets with a limited number of values. For example, if we divide a group of students up by their high school class year, we may have four categories of first year student, sophomore, junior, and senior. Similarly, we might categorize household pets into the categories of dog, cat, bird, reptile, and snake. The important characteristic of categorical data that differentiates it from other text is that there is a limited set of values from which we can choose. A person's name, for example, would not be categorical because there are an unlimited number of possible names.