What is descriptive analysis and why would we do it?
So, we have all this data that tells us all this information about different traits or characteristics of the people for whom the data was collected. For example, if we collected data about the students in this course, we may have information about how tall you are, about what kind of insurance you have, and about what your favorite color is.
student_id |
height_in |
insurance |
color |
1001 |
64.96 |
private |
blue |
1002 |
67.93 |
other |
yellow |
1003 |
84.03 |
none |
red |
But, unless you’re a celebrity, or under investigation for some reason, it’s unlikely that many people outside of your friends and family care to know any of this information about you, per se. Usually they want to know this information about the typical person in the population, or subpopulation, to which you belong. Or, they want to know more about the relationship between people who are like you in some way and some outcome that they are interested in.
For example: We typically aren’t interested in knowing that student 1002 is 67.93 inches tall. We are typically more interested in knowing things like the average height of the class – 72.31.
Before we can make any inferences or draw any conclusions using our data, we must (or at least should) begin by conducting descriptive analysis of our variables. This can also be referred to as exploratory analysis. There are at least three reasons why we want to start with a descriptive analysis:
- We can use descriptive analysis to uncover errors in our data.
- It helps us understand the distribution of values in our variables.
- Descriptive analysis serve as a starting point for understanding relationships between our variables.
LS0tCnRpdGxlOiAiSW50cm9kdWN0aW9uIHRvIERlc2NyaXB0aXZlIEFuYWx5c2lzIgphdXRob3I6ICJCcmFkIENhbm5lbGwiCmRhdGU6ICJDcmVhdGVkOiAyMDE5LTA0LTIyIDxicj4gVXBkYXRlZDogYHIgU3lzLkRhdGUoKWAiCm91dHB1dDogCiAgaHRtbF9ub3RlYm9vazogCiAgICB0b2M6IHRydWUKICAgIHRvY19mbG9hdDogdHJ1ZQogICAgY3NzOiAiLi4vLi4vY3NzL2xtLW1hcmtkb3duLXN0eWxlcy5jc3MiCi0tLQoKYGBge3Igc2V0dXAsIGluY2x1ZGU9RkFMU0V9CmtuaXRyOjpvcHRzX2NodW5rJHNldChlY2hvID0gVFJVRSkKbGlicmFyeSh0aWR5dmVyc2UpCmBgYAoKIyBXaGF0IGlzIGRlc2NyaXB0aXZlIGFuYWx5c2lzIGFuZCB3aHkgd291bGQgd2UgZG8gaXQ/CgpTbywgd2UgaGF2ZSBhbGwgdGhpcyBk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