Day 3

Math 216: Statistical Thinking

Bastola

Descriptive Statistics

  • Summarize and visualize data to make sense of it.
  • Descriptive statistics (or exploratory data analysis (EDA)) involves summarizing and visualizing variables and their relationships.
  • The methods depend on the type of variable(s) being analyzed (qualitative or quantitative).

One Qualitative Variable

A random sample of US adults in 2012 were surveyed regarding the type of cell phone owned.


Android? iPhone? Blackberry? Non-smartphone? No cell phone?

Frequency Table

A frequency table shows the number of cases or counts that fall in each category:

Subset of Raw Data Device Type
Case 1 Android
Case 2 none
Case 3 none
Case 4 iPhone
Case 5 Non Smartphone
Case 6 iPhone
Case 7 Blackberry
Case 8 Non Smartphone
Case 9 Android
Case 10 Android
(for 2253 cases …)
Cell Phone Type Frequency
Android 458
iPhone 437
Blackberry 141
Non Smartphone 924
No Cell Phone 293
Total 2253

Proportion

The proportion in a category is found by: \[ \text{proportion} = \frac{\text{number in category}}{\text{total sample size}} \]

  • Population proportion (parameter): \(p\)
  • Sample proportion (statistic): \(\hat{p}\) (“p-hat”)

What proportion of adults sampled do not own a cell phone?

Cell Phone Type Frequency Proportion
Android 458 0.203
iPhone 437 0.194
Blackberry 141 0.063
Non Smartphone 924 0.410
No Cell Phone 293 0.130
Total 2253 1.000

Bar Chart

In a barplot, the height of the bar corresponds to the number of cases falling in each category.

Two Qualitative Variables

Look at the relationship between two qualitative variables:

  • Relationship status
  • Gender
Female Male Total
In a Relationship 32 10 42
It’s Complicated 12 7 19
Single 63 45 108
Total 107 62 169

Relationship Status and Gender

Proportion of students in a relationship that are female?

prop.relation.female <- 32/42
round(prop.relation.female, 2)
[1] 0.76

Proportion of students in a relationship that are male?

prop.relation.male <- 10/42
round(prop.relation.male, 2)
[1] 0.24

Difference in Proportions

A difference in proportions is a difference in proportions for one qualitative variable calculated for different levels of the other qualitative variable.

Example: Difference in proportions of male and female that are in a relationship: \[ \hat{p}_F - \hat{p}_M = \frac{32}{107} - \frac{10}{62} = 0.14 \]

prop.female <- 32/107
prop.male <- 10/62
prop.diff <- prop.female - prop.male
round(prop.diff, 2)
[1] 0.14

Student Survey

Dataset on 362 responses to a student survey given at one college.

Year Gender Smoke Exercise TV Height Weight Siblings BirthOrder GPA Pulse
Senior M No 10.0 1 71 180 4 4 3.13 54
Sophomore F Yes 4.0 7 66 120 2 2 2.50 66
FirstYear M No 14.0 5 72 208 2 1 2.55 130
Junior M No 3.0 1 63 110 1 1 3.10 78
Sophomore F No 3.0 3 65 150 1 1 2.70 40
Sophomore F No 5.0 4 65 114 2 2 3.20 80
FirstYear F No 10.0 10 66 128 1 1 2.77 94
Sophomore M No 13.0 8 74 235 1 1 3.30 77
Junior F No 3.0 6 61 NA 2 2 2.80 60
FirstYear F No 12.0 1 60 115 7 8 3.70 94
Sophomore F No 12.0 6 65 140 1 2 2.09 63
FirstYear M No 10.0 5 63 200 2 2 NA 72
Sophomore M No 12.0 8 68 162 3 NA 2.90 54
Junior F No 6.0 1 68 135 2 3 3.08 66
FirstYear M No 9.0 5 68 193 1 1 NA 72
FirstYear F No 10.0 2 63 110 1 2 3.86 59
FirstYear F No 3.0 15 63 99 2 1 3.00 88
Sophomore M No 7.0 3 72 165 2 1 3.00 59
Sophomore F No 2.0 1 62 120 1 1 3.35 64
Sophomore F No 14.0 2 67 154 1 2 3.30 72
Sophomore F No 10.0 5 65 110 1 2 3.40 74
Sophomore F No 14.0 2 68 145 8 8 2.90 70
FirstYear M No 20.0 20 73 195 3 4 3.50 58
Sophomore M No 7.0 10 74 200 1 2 3.00 48
Sophomore M No 12.0 3 70 167 1 2 3.30 74
Sophomore M No 10.0 5 71 175 3 2 3.70 60
Sophomore F No 6.0 8 67 155 1 1 3.48 74
Junior M No 14.0 2 74 185 1 2 3.40 70
FirstYear M No 12.0 6 68 190 1 1 2.50 74
Senior M No 10.0 4 72 165 1 2 3.30 60
Junior M No 8.0 8 62 175 2 3 3.50 55
Sophomore F No 0.0 2 66 126 5 6 3.79 82
FirstYear M No 10.0 20 70 187 3 2 3.30 68
Senior M No 6.0 10 72 170 2 2 2.90 83
FirstYear F No 5.0 2 67 158 4 2 2.68 53
Sophomore F No 24.0 5 62 119 1 2 3.28 72
FirstYear M No 2.0 5 73 205 1 1 3.51 86
Sophomore F No 10.0 5 67 129 1 1 2.60 67
Sophomore F No 6.0 5 67 145 0 1 3.85 89
Junior F No 5.0 5 64 130 0 NA 2.40 48
Senior M No 5.0 5 72 215 3 1 3.40 64
Sophomore F No 12.0 4 64 135 2 3 2.40 73
Sophomore F No 2.0 5 70 145 0 1 3.00 80
FirstYear F No 7.0 8 60 98 2 2 3.10 85
FirstYear M No 15.0 2 71 150 1 1 2.94 60
Junior M No 5.0 14 73 159 1 1 3.31 61
Senior M No 7.0 20 72 174 1 2 3.30 80
Sophomore M No 15.0 20 74 160 1 2 2.90 70
Senior M No 8.0 10 70 165 1 2 3.40 61
Sophomore F No 14.0 3 69 161 1 2 3.16 58
FirstYear M No 14.0 1 68 160 2 1 NA 42
Senior F No 4.0 14 64 130 2 2 3.84 88
Junior M No 15.0 0 72 175 2 1 3.60 68
Senior M No 4.0 20 70 255 2 2 2.36 68
Junior M No 15.0 2 65 160 4 4 2.90 35
FirstYear M No 3.0 6 72 160 0 1 3.00 90
Junior F No 3.0 15 63 95 0 1 3.30 88
Sophomore F No 15.0 3 64 115 2 2 3.70 67
Sophomore F No 20.0 2 64 120 1 1 2.90 71
FirstYear F No 3.0 1 65 135 2 3 3.60 68
Sophomore M No 6.0 7 73 180 1 2 3.56 73
Senior M No 12.0 7 71 155 0 1 3.70 55
FirstYear F No 4.0 3 66 110 2 1 4.00 78
FirstYear M No 20.0 12 73 215 2 3 3.40 96
FirstYear M No 15.0 6 70 175 2 3 NA 63
Sophomore F No 10.0 3 65 140 3 4 3.30 73
FirstYear M No 10.0 20 72 195 2 2 3.10 60
Sophomore M No 4.0 8 73 185 2 1 2.50 80
Sophomore M No 9.0 0 70 185 2 1 3.20 96
Senior M No 12.0 12 79 209 1 1 3.10 49
Senior F No 2.0 6 67 145 3 2 3.50 62
Sophomore F No 15.0 4 66 140 1 1 3.00 68
FirstYear F No 10.0 4 66 146 1 2 3.25 52
FirstYear F No 7.0 6 68 130 2 1 2.40 71
Sophomore F No 3.0 5 67 140 1 2 3.22 72
FirstYear F No 4.0 3 66 130 1 1 NA 65
FirstYear F No 15.0 3 66 140 1 1 NA 90
Sophomore F No 8.0 8 65 160 3 3 3.64 77
Sophomore F No 5.0 8 66 120 1 1 3.50 68
Sophomore M No 10.0 20 76 150 1 1 2.50 60
Sophomore M No 15.0 5 69 155 1 1 3.40 65
FirstYear F No 4.0 4 64 128 3 1 NA 60
FirstYear F No 5.0 4 64 143 2 2 3.25 84
Junior F No 6.0 3 65 155 2 1 3.70 80
FirstYear F No 18.0 2 67 119 2 1 2.10 66
Sophomore F No 16.0 4 66 138 1 2 2.80 70
Senior M No 4.0 5 72 240 1 1 3.49 70
FirstYear F No 3.0 2 65 160 1 1 3.83 72
FirstYear M No 20.0 3 69 191 3 1 NA 66
FirstYear M No 5.0 8 69 165 5 4 2.70 69
Sophomore M No 10.0 6 73 200 2 3 2.80 89
FirstYear F No 2.0 4 62 125 1 1 3.13 79
Sophomore F No 4.0 5 69 140 2 3 3.62 98
Sophomore M No 14.0 5 73 206 1 1 2.00 48
FirstYear M No 7.0 5 76 275 1 2 3.60 71
Sophomore M No 12.0 8 70 142 1 2 4.00 51
Sophomore F No 14.0 2 67 140 6 7 3.10 67
Sophomore M No 3.0 10 68 145 5 6 2.60 66
Sophomore M No 5.0 4 72 128 1 1 3.70 66
FirstYear M No 15.0 5 74 165 1 1 3.57 60
Senior F No 5.0 20 62 140 1 1 2.90 77
Sophomore F No 4.0 14 69 130 1 2 3.15 80
FirstYear M No 8.0 2 70 170 3 2 3.88 70
Sophomore M No 14.0 4 69 160 2 2 3.50 65
Sophomore M No 5.0 8 72 165 2 2 2.80 57
F No 12.0 7 78 145 1 1 NA 37
Sophomore M No 15.0 5 67 155 1 2 2.90 84
Sophomore M No 3.0 3 73 155 3 2 3.21 56
Sophomore F No 12.0 1 63 113 1 2 3.50 69
Sophomore M No 12.0 5 70 155 1 2 3.33 62
Sophomore M No 6.0 20 NA 173 1 1 3.00 79
Sophomore M No 2.0 8 65 195 2 1 3.50 55
Sophomore F No 3.0 3 73 120 1 1 3.95 89
FirstYear M No 24.0 6 78 225 2 1 2.10 78
FirstYear F No 3.0 1 65 160 1 2 3.00 83
Sophomore F No 6.0 1 63 120 2 1 3.00 58
Sophomore F No 12.0 10 68 138 1 2 3.75 77
Sophomore M No 18.0 3 72 260 2 3 2.50 50
Sophomore M No 2.0 7 70 150 2 3 3.40 87
FirstYear F No 12.0 3 67 135 3 4 3.40 74
Sophomore F No 5.0 10 72 165 1 1 3.14 76
FirstYear M No 3.0 3 68 142 3 4 2.60 50
Sophomore M No 3.0 3 78 210 6 5 3.40 70
Sophomore M No 21.0 25 69 171 1 1 2.70 84
Sophomore F No 12.0 2 80 150 4 1 3.15 68
Sophomore M No 3.0 15 71 188 3 1 2.20 66
Sophomore M No 20.0 6 70 195 0 1 3.50 76
FirstYear M No 8.0 13 75 230 2 1 2.90 65
Sophomore F No 2.0 3 64 140 2 3 2.50 65
Sophomore M No 15.0 2 78 200 1 1 3.50 68
Senior F No 6.0 5 68 140 0 1 3.60 78
FirstYear F No 2.0 1 69 180 5 3 3.10 74
Sophomore F No 1.0 4 63 160 1 1 3.00 76
Sophomore F No 13.0 5 64 135 3 2 3.00 79
Sophomore F No 12.0 10 63 140 2 3 3.80 81
Sophomore F No 10.0 4 72 155 2 1 3.15 56
Sophomore M No 10.0 3 63 235 5 3 2.75 48
FirstYear F No 10.0 2 63 140 3 2 2.80 68
Sophomore F No 3.0 4 68 130 2 3 3.00 62
Junior F No 2.0 3 67 125 5 4 3.10 70
FirstYear M No 10.0 3 71 222 1 1 2.27 46
FirstYear F No 4.0 3 65 128 3 1 2.80 88
FirstYear M No 8.0 2 72 183 2 2 3.02 68
Junior M No 18.0 20 75 175 0 1 2.93 74
FirstYear F No 5.0 3 59 125 1 1 3.20 88
Sophomore F No 4.0 4 69 156 1 1 3.00 67
FirstYear F No 20.0 3 63 145 3 4 3.00 61
Sophomore M No 14.0 4 74 195 4 2 2.70 62
Sophomore M No 8.0 13 70 185 2 1 3.20 69
FirstYear F No 4.0 5 64 150 1 1 2.90 59
Sophomore F No 5.0 5 67 140 0 NA 3.00 79
FirstYear M No 14.0 4 66 150 1 1 2.72 56
FirstYear F No 4.0 3 67 150 0 1 3.30 85
Sophomore M No 4.0 10 73 220 1 2 NA 72
Senior M No 15.0 10 71 195 2 3 2.22 69
Sophomore F No 12.0 7 66 140 1 2 3.26 61
FirstYear F No 10.0 10 68 135 2 3 3.50 95
Sophomore F No 6.0 3 67 138 1 1 3.10 58
Senior F No 12.0 5 69 170 2 3 3.30 57
Sophomore F No 10.0 2 66 145 1 1 3.29 80
FirstYear M No 14.0 5 68 135 2 3 NA 60
FirstYear F No 5.0 4 68 140 0 1 3.69 69
Sophomore M No 18.0 5 71 155 2 2 2.65 73
Senior M No 10.0 10 70 155 1 2 3.25 62
Sophomore M No 8.0 2 66 155 1 1 2.80 64
Sophomore F No 8.0 10 65 135 2 3 3.36 86
Junior M No 3.0 15 70 165 1 1 2.97 73
FirstYear M No 5.0 20 71 160 2 1 3.31 71
Sophomore M No 4.0 21 71 175 1 1 3.05 72
Sophomore M No 8.0 10 70 183 3 2 2.20 84
Sophomore F No 3.0 10 65 140 2 3 3.30 120
Sophomore F No 12.0 4 67 140 1 1 3.45 77
Junior F No 5.0 10 61 110 2 2 3.83 80
Sophomore F No 5.0 3 68 125 0 1 3.00 80
Senior F No 15.0 2 65 125 2 2 3.35 54
FirstYear M No 10.0 7 70 180 2 3 2.40 54
Sophomore M No 10.0 10 72 195 2 3 3.10 78
Sophomore F No 10.0 6 66 128 3 3 3.40 72
FirstYear M No 14.0 2 71 172 1 1 2.82 78
Sophomore F No 6.0 4 64 150 1 1 2.90 69
Sophomore M No 4.0 27 73 188 1 1 3.40 80
Sophomore F No 14.0 2 60 110 2 1 3.20 76
Sophomore F No 5.0 15 64 125 1 1 3.20 74
Sophomore F No 16.0 10 65 135 3 1 3.80 70
FirstYear F No 14.0 3 65 130 2 2 3.57 72
Sophomore M No 10.0 10 73 230 2 2 3.33 60
Sophomore M No 11.0 10 69 198 1 2 2.90 71
Sophomore F No 4.0 10 66 127 1 2 3.20 70
Sophomore M No 12.0 5 66 150 1 2 3.10 53
Sophomore M No 5.0 4 73 175 3 1 3.25 70
Junior M No 8.0 14 71 160 3 4 3.40 75
Junior F No 8.0 6 65 140 2 3 3.80 84
Sophomore M No 3.0 5 75 200 1 1 3.38 66
Sophomore F No 8.0 2 63 130 1 1 3.88 72
Sophomore M No 20.0 14 74 210 3 3 2.75 70
Sophomore M No 10.0 5 70 210 2 2 2.90 49
Sophomore F No 3.0 3 63 145 4 5 3.60 81
Sophomore M No 4.0 6 75 156 3 1 2.80 77
FirstYear M No 8.0 10 71 207 0 1 2.20 72
FirstYear F No 15.0 5 68 150 1 2 NA 38
Sophomore F No 14.0 10 68 137 2 2 3.30 60
FirstYear M No 14.0 2 72 153 2 3 2.85 64
Junior F No 12.0 5 63 175 2 3 3.37 65
Sophomore F No 6.0 2 65 136 3 1 3.50 72
Sophomore F No 3.0 10 65 104 2 2 3.55 54
FirstYear F No 12.0 3 67 122 3 4 3.20 82
Sophomore M No 5.0 40 72 192 1 1 2.47 82
FirstYear M No 8.0 10 71 218 1 2 2.72 62
Sophomore M No 1.0 14 68 170 4 5 3.40 52
FirstYear M No 10.0 4 72 220 2 2 NA 66
Sophomore F No 7.0 2 64 150 1 1 3.40 55
Senior M No 5.0 7 71 135 4 3 3.10 63
Senior F No 10.0 2 62 155 1 1 3.10 78
Sophomore F No 12.0 5 65 135 1 1 2.94 65
Sophomore M No 15.0 15 68 140 1 2 3.00 64
FirstYear F No 10.0 5 67 120 1 1 NA 70
Sophomore F No 7.0 12 68 135 3 1 3.60 70
Sophomore F No NA 4 64 135 1 1 3.60 65
Sophomore M No 15.0 0 72 165 2 1 3.50 71
Junior M No 10.0 15 71 180 1 2 3.40 54
Sophomore M No 15.0 0 72 165 2 1 3.50 71
Sophomore M No 12.0 6 72 175 2 2 3.00 54
Sophomore M No 10.0 5 71 200 1 2 2.75 70
Sophomore M No 12.0 10 71 138 0 1 3.56 65
Senior M No 5.0 3 71 265 1 1 2.70 82
Sophomore F No 14.0 16 61 105 1 2 3.68 63
Sophomore F No 3.0 9 68 130 3 3 3.50 71
Sophomore M No 12.0 2 70 165 1 1 3.50 75
Sophomore F No 15.0 5 67 145 1 2 3.40 60
FirstYear F No 3.0 6 64 138 1 1 2.60 54
Sophomore F No 25.0 12 71 193 2 2 3.25 68
Sophomore M No 5.0 1 71 170 1 1 3.30 70
Sophomore M No 6.0 0 69 155 1 1 3.20 90
Sophomore M No 27.0 2 70 155 1 1 2.90 72
Junior F No 8.0 10 65 140 2 1 3.85 41
Sophomore F No 3.0 1 65 130 1 1 3.40 80
Sophomore M No 17.0 14 72 180 3 3 3.40 68
FirstYear M No 40.0 2 67 140 2 2 NA 64
Sophomore M No 5.0 10 74 210 1 2 2.70 78
Sophomore M No 0.0 7 NA 150 0 1 3.81 65
Sophomore F No 27.0 2 62 115 1 2 3.40 64
Sophomore M No 3.0 5 75 225 3 1 3.23 78
FirstYear M No 3.0 7 67 170 2 3 3.10 42
Sophomore F No 11.0 20 63 120 0 1 2.89 60
Senior M No 2.0 4 71 170 1 1 2.81 59
Sophomore F No 9.0 1 63 130 2 3 3.00 54
FirstYear M No 12.0 8 70 182 1 2 3.77 70
Sophomore M No 15.0 2 67 138 1 2 3.30 52
Sophomore M No 2.0 5 74 180 2 1 3.00 88
Sophomore M No 20.0 6 69 230 0 1 2.90 60
Junior M No 12.0 5 70 222 2 1 3.50 66
FirstYear M No 5.0 2 70 145 4 4 3.60 55
Sophomore M No 10.0 4 70 150 1 1 3.70 74
Senior M No 2.0 2 68 190 0 1 3.20 59
Sophomore M No 12.0 20 76 195 3 1 2.87 84
Sophomore F No 5.0 2 59 115 1 2 3.30 68
Junior F No 3.0 1 66 140 1 2 3.30 74
Sophomore M No 12.0 10 68 155 1 1 3.45 58
Sophomore M No 8.0 3 72 150 2 1 3.10 62
Sophomore M No 8.0 4 69 155 2 1 3.71 84
Sophomore M No 5.0 3 NA 130 2 1 3.30 72
FirstYear M No 6.0 14 75 210 3 2 3.30 52
F No 8.0 10 63 105 3 1 NA 80
Junior M No 10.0 10 71 192 1 1 3.73 68
FirstYear F No 18.0 3 72 220 3 4 3.13 71
Junior F No 12.0 0 64 134 1 2 3.89 55
Sophomore M No 10.0 5 68 160 1 1 3.05 68
Junior M No 10.0 5 68 135 1 1 3.20 61
Sophomore M No 5.0 2 67 140 1 1 3.25 80
Sophomore F No 7.0 2 66 135 0 1 2.90 66
FirstYear M No 3.0 5 74 145 1 2 3.00 70
FirstYear F No 7.0 4 64 140 2 1 3.50 78
Sophomore F No 3.0 2 NA NA 2 2 3.50 88
Sophomore F No 4.0 3 65 138 2 2 3.60 72
FirstYear F No 8.0 4 64 NA 2 2 3.40 65
Sophomore F No 7.0 5 64 130 2 2 3.25 63
Senior M No 7.0 9 72 210 2 2 2.70 70
Senior M No 3.0 1 69 233 1 1 3.78 72
FirstYear F No 7.0 7 70 180 6 7 4.00 63
FirstYear M No 14.0 6 67 185 1 1 3.00 68
Sophomore M No 5.0 6 76 189 3 2 3.30 64
FirstYear F No 14.0 5 66 127 1 1 2.80 64
Senior M No 5.0 4 63 135 1 1 2.50 60
Sophomore F No 5.0 5 66 140 0 1 3.50 68
Sophomore F No 2.0 20 68 162 2 1 2.80 70
Sophomore F No 1.0 3 67 215 0 1 3.40 63
Senior M No 15.0 5 73 200 2 1 3.00 57
Sophomore F No 5.0 1 62 120 1 1 3.27 84
FirstYear M No 5.0 2 67 165 3 4 3.50 74
FirstYear M No 15.0 14 71 175 2 3 3.00 61
Sophomore F No 5.0 3 66 160 2 1 3.60 78
Sophomore M No 20.0 0 68 145 1 2 3.25 65
Junior F No 3.0 5 60 180 3 4 3.00 68
FirstYear F No 7.0 0 71 170 1 1 2.75 76
Sophomore M No 20.0 10 75 235 2 1 2.90 54
Sophomore F No 10.0 10 65 155 1 1 3.00 56
Senior M No 6.0 15 65 140 3 3 3.00 88
Sophomore F No 6.0 1 66 145 2 2 2.90 77
FirstYear M No 10.0 3 71 175 2 2 3.36 52
Sophomore M No 9.0 6 76 210 2 2 3.25 62
FirstYear F No 1.5 20 67 130 1 1 3.50 80
Sophomore M No 20.0 28 72 195 1 1 2.76 60
Sophomore M No 8.0 3 67 165 1 2 NA 67
Sophomore M No 21.0 1 73 180 6 3 2.75 51
Sophomore F No 10.0 5 60 145 1 2 3.25 81
Sophomore M No 8.0 12 70 163 2 1 3.00 62
Junior M No 10.0 1 75 160 1 2 2.80 84
Junior F No 18.0 7 67 150 1 1 3.40 75
Sophomore M No 15.0 6 71 170 3 1 3.25 60
Sophomore F No 8.0 5 NA 110 3 3 3.50 76
Senior M No 6.0 2 66 170 1 2 3.05 65
Sophomore M No 12.0 3 69 145 2 2 3.18 65
FirstYear F No 10.0 4 69 160 1 2 3.00 64
Junior F No 7.0 4 63 130 1 1 2.23 75
Sophomore F No 5.0 5 65 155 1 1 3.40 93
FirstYear F No 6.0 4 65 NA 1 2 3.30 75
Senior M No 5.0 5 72 160 2 3 3.43 82
Sophomore F No 5.0 5 66 151 1 1 3.88 80
Sophomore M No 30.0 10 74 180 1 1 3.45 69
Senior F No 5.0 4 64 130 2 3 3.00 85
Junior M Yes 12.0 5 75 185 1 2 3.00 76
Senior M Yes 0.0 1 73 198 1 1 3.18 76
FirstYear M Yes 12.0 5 72 175 2 3 2.20 65
Senior F Yes 0.0 14 67 123 1 1 3.29 67
Junior F Yes 15.0 10 64 145 1 1 3.50 64
FirstYear M Yes 18.0 15 67 190 0 1 2.80 71
Sophomore F Yes 12.0 5 65 130 2 3 2.90 65
Sophomore M Yes 2.0 3 70 185 4 3 3.50 83
FirstYear M Yes 12.0 20 68 165 1 1 2.50 65
Sophomore M Yes 3.0 5 70 165 3 2 3.25 77
Junior M Yes 3.0 3 67 150 2 2 2.90 66
FirstYear M Yes 4.0 3 72 160 1 2 3.66 62
Junior F Yes 12.0 2 64 142 3 3 3.01 58
FirstYear M Yes 25.0 5 72 165 1 1 2.25 48
Junior M Yes 3.0 4 75 175 0 1 3.20 61
Sophomore M Yes 6.0 6 69 175 2 1 3.35 50
Sophomore F Yes 7.0 8 68 190 1 1 3.00 72
Sophomore M Yes 7.0 2 72 180 2 2 3.00 74
Sophomore M Yes 6.0 2 74 185 1 2 3.48 80
Sophomore M Yes 6.0 2 NA NA 1 1 2.88 90
Sophomore F Yes 13.0 4 64 135 3 2 2.60 72
Sophomore M Yes 25.0 8 73 195 1 1 2.75 64
Senior M Yes 8.0 12 71 175 0 1 3.30 72
Sophomore M Yes 5.0 5 70 165 1 1 3.25 70
FirstYear M Yes 11.0 6 68 135 1 1 3.30 84
Sophomore F Yes 18.0 5 69 140 1 1 3.20 87
Sophomore M Yes 10.0 NA NA 182 2 1 2.60 60
FirstYear M Yes 6.0 14 72 155 1 2 3.00 60
FirstYear F Yes 2.0 1 68 180 2 3 3.25 80
Senior M Yes 5.0 25 69 170 1 1 3.30 70
Sophomore F Yes 5.0 3 66 135 3 2 3.25 78
FirstYear M Yes 6.0 25 72 165 2 1 2.83 75
Sophomore F Yes 10.0 10 65 137 0 1 3.30 42
Sophomore M Yes 4.0 1 70 147 2 2 3.60 80
Senior F Yes 5.0 4 66 150 1 2 3.70 72
Junior F Yes 17.0 2 67 155 2 1 2.83 96
Sophomore M Yes 7.0 10 71 160 2 3 3.30 95
Sophomore F Yes 2.0 0 83 130 1 1 3.44 80
Sophomore M Yes 8.0 10 61 180 2 1 3.00 74
Sophomore F Yes 1.0 1 65 150 2 2 3.27 78
FirstYear M Yes 14.0 5 77 205 2 2 2.30 72
Sophomore F Yes 12.0 5 60 115 0 1 2.60 91

Distribution

In the given dataset, there are multiple variables (such as Gender, Smoke, Exercise, Height, Weight, etc.) for different students across various academic years.

Knowing the distribution of each variable can help us identify relationships, trends, and potential anomalies in the data.

Distribution

“The distribution of the variable Y” describes its center, variability, and shape using both numbers and graphics.

Center: Mean or Average

  • Mean: Average value in a sample or population.
    • Sample mean: \(\bar{y} = \dfrac{\sum_{i=1}^n y_i}{n}\)
    • Population mean: \(\mu\)
mean(survey$Pulse)
[1] 69.57459

The mean pulse rate for this sample of students is \(\bar{y} = 69.6\) beats per minute.

Center: Median

  • Median: The middle value when the data are ordered.
    • Sample median: \(m\)
    • Population median: \(M\)
median(survey$Pulse)
[1] 70

The median pulse rate for this sample of students is \(m = 70\) beats per minute.

Variability: Standard Deviation

  • Standard Deviation (SD): Average deviation from the center in a sample or population.
    • Sample SD: \(s = \sqrt{ \dfrac{\sum_{i=1}^n (y_i - \overline{y})^2}{n-1}}\)
    • Population SD: \(\sigma\)
sd(survey$Pulse)
[1] 12.20514

The SD of pulse rates for this sample of students is \(s = 12.2\) beats per minute. The “average” deviation of individual pulse rates around the mean value is about 12.2 beats per minute.