Get startedGet started for free

Descriptive statistics in survey analysis

1. Descriptive statistics in survey analysis

Let's dive into descriptive statistics for survey analysis.

2. What are descriptive statistics in survey analysis?

Descriptive statistics are the basic measures used to describe most data. In surveys, they consist of summary descriptions of single variables and the associated survey samples.

3. Why use descriptive statistics?

Descriptive statistics allow data to be summarized and presented meaningfully and clearly. This can be in the form of tabular presentations or visualizations. They can also help identify any outliers or anomalous observations in the data.

4. Frequency and distributions

The first type of descriptive statistics for survey data is frequency and percentage response distributions. This is when we present grouped data categorized based on mutually exclusive classes and the number of occurrences in each respective class. For example, if we survey people on how often they visited the library in the past year, we can count the number of responses received by gender. Performed on qualitative and quantitative data, this method can depict the count of different outcomes in a raw survey dataset. It is normally presented in a table or graph, such as bar charts, histograms, pie charts, and line charts.

5. Central tendency: mean, median, mode

The second type includes measures of central tendency, such as the mean, median, and mode. This is a single value reflecting the center of data distribution. The mean measures the average value, the median measures the middle score for the dataset in ascending order, and the mode is the most frequent value in the dataset.

6. Measures of variability

Another type includes the range and standard deviation, which determine how far apart data points appear to fall from the center. The range is the distance between the highest and lowest values. The standard deviation, which is the average variance and an insight into the distance between a value in a dataset and the mean value, depicts the spread in a survey dataset.

7. Survey: dietary_habits

Let's study dietary habits by gender. The dietary_habits survey asks participants how many meals they had in a day, and how many times a week they ordered in or ate out.

8. Frequency distribution: dietary_habits

Let's list all possible genders indicated in the survey, and on the right, count the number of responses for each. The value_counts function applied on the Gender column helps us to do just that. The to_frame function returns a DataFrame with one column, which we'll specify as Number, the number of Male and Female respondents, and the index, which is the Gender.

9. Frequency distribution: dietary_habits

To create a bar plot of our response, we can add dot-plot, and in the parentheses, specify kind equals bar. The table and the plot show that slightly more men than women took part in the survey.

10. Measures of central tendency: dietary_habits

To calculate the mean, median and mode, we use the functions mean, median, and mode.

11. Measures of central tendency: dietary_habits

The mean function averages each numeric columns, by default.

12. Measures of central tendency: dietary_habits

The median function calculates the middle value of each numeric column, by default.

13. Measures of central tendency: dietary_habits

The mode function gives us the most popular response in each column.

14. Measures of variability: dietary_habits

To find the range of meals eaten per day based on our survey, we use the difference between the maximum and minimum values, with the max and min functions respectively. Our results show that the lowest number of meals per day reported is three meals apart from the highest number of meals per day reported. This information together with our standard deviation, calculated using the std function, tells us that on average, each meal value deviates from the mean by 0-point-65 points. In other words, there really isn't much variability within the dataset for number of meals per day reported. A chef, for example, can plan for this group of people to eat within three meals of each other.

15. Let's practice!

Let's test our knowledge!