Reading data

Gender and age

Height and weight

Inference

ViË‡sina, teË‡za in BMI Primer analize Andrej Blejec

20. oktober 2011

What about the BMI?

Reading data

Gender and age

Height and weight

Inference

What about the BMI?

Data analysis: BMI To show the flavor of R data analysis, we will analyze a small dataset of peopleâ€™s height and weight. People try to care about their body weight. It is a common knowledge, that weight is increasing with height. To compensate for the influence of height on weight, Body Mass Index (BMI) was introduced that can be calculated as: weight BMI = height 2 where weight is measured in kilograms and height is measured in meters. Our analysis will try to investigate the weights of different gender and age groups and the influence of height on weight and calculated BMI.

Reading data

Gender and age

Height and weight

Data file: bmiall.txt

gender age weight height M 17 73.6 1.730 M 17 71.0 1.765 M 17 62.4 1.770 M 17 71.0 1.870 M 17 72.4 1.765 ... F F F F F F

18 18 18 18 18 18

52.6 46.2 52.4 54.0 55.2 55.4

1.626 1.624 1.638 1.630 1.690 1.677

Inference

What about the BMI?

Reading data

Gender and age

Height and weight

Reading data

1 2 3 4 5 6

gender age weight height M 17 73.6 1.730 M 17 71.0 1.765 M 17 62.4 1.770 M 17 71.0 1.870 M 17 72.4 1.765 M 17 104.0 1.825

Inference

What about the BMI?

Reading data

Gender and age

Height and weight

Inference

What about the BMI?

Get info about the data

'data.frame': 419 obs. of 4 variables: $ gender: Factor w/ 2 levels "F","M": 2 2 2 2 2 2 2 2 2 $ age : int 17 17 17 17 17 17 17 17 17 17 ... $ weight: num 73.6 71 62.4 71 72.4 104 70.4 79.8 63.4 $ height: num 1.73 1.76 1.77 1.87 1.76 ... [1] 419

4

Reading data

Gender and age

Height and weight

Inference

What about the BMI?

Data summary

gender F:205 M:214

age Min. :17.00 1st Qu.:17.00 Median :17.00 Mean :17.49 3rd Qu.:18.00 Max. :18.00

weight Min. : 44.80 1st Qu.: 57.20 Median : 63.20 Mean : 64.59 3rd Qu.: 71.00 Max. :104.00

height Min. :1.502 1st Qu.:1.652 Median :1.720 Mean :1.720 3rd Qu.:1.780 Max. :1.970

Reading data

Gender and age

Gender and age tables

gender F M 205 214 age gender 17 18 F 101 104 M 112 102

Height and weight

Inference

What about the BMI?

Reading data

Gender and age

Height and weight

Inference

Flat contingency table

> highWeight <- weight > mean(weight) > ftable(gender, age, highWeight) highWeight FALSE TRUE gender age F 17 18 M 17 18

80 80 40 29

21 24 72 73

What about the BMI?

Reading data

Gender and age

Contingency tables ...

, , age = 17 gender highWeight F M FALSE 80 40 TRUE 21 72 , , age = 18 gender highWeight F M FALSE 80 29 TRUE 24 73

Height and weight

Inference

What about the BMI?

Reading data

Gender and age

Height and weight

Inference

What about the BMI?

... and independence test

Call: xtabs(formula = ~highWeight + gender + age) Number of cases in table: 419 Number of factors: 3 Test for independence of all factors: Chisq = 89.81, df = 4, p-value = 1.448e-18 1 5 3 7 2 6 4 8

highWeight gender age Freq FALSE F 17 80 FALSE F 18 80 FALSE M 17 40 FALSE M 18 29 TRUE F 17 21 TRUE F 18 24 TRUE M 17 72 TRUE M 18 73

Reading data

Gender and age

Height and weight

Inference

What about the BMI?

Total, row, and column proportions: prop.table()

age gender 17 18 F 0.24 0.25 M 0.27 0.24 age gender 17 18 F 0.49 0.51 M 0.52 0.48 age gender 17 18 F 47.4 50.5 M 52.6 49.5

Reading data

Gender and age

Height and weight

Plot table - weight above Q3

17 18 F 4 8 M 43 49

Inference

What about the BMI?

Reading data

Gender and age

Height and weight

Mosaic plot Weight above Q3 = 71

M

F

17

18

Inference

What about the BMI?

Reading data

Gender and age

Height and weight

Inference

Barplot

0

10

20

30

40

Weight above Q3 = 71

17

18

What about the BMI?

Reading data

Gender and age

Height and weight

Inference

What about the BMI?

Numerical variables and summary statistics > mean(weight) [1] 64.5883 > mean(height) [1] 1.719964 > c(sd(weight), sd(height)) [1] 10.53051077 0.08752747 > (V <- var(cbind(weight, height))) weight height weight 110.8916572 0.601565848 height 0.6015658 0.007661059 > cor(weight, height) [1] 0.6526635 > my.cor <- V[1, 2]/(sd(weight) * sd(height)) > cat("Correlation r =", my.cor, "\n") Correlation r = 0.6526635

Reading data

Gender and age

Height and weight

Inference

What about the BMI?

Are there differences in weight and height in gender age classes?

1 2 3 4

Group.1 Group.2 weight height 17 F 58.51881 1.650644 18 F 59.42500 1.656644 17 M 69.12500 1.775857 18 M 70.88137 1.791794

Reading data

Gender and age

Height and weight

Inference

Grand tour: height Data, histogram, boxplot, and quantile plot

0

100

200

300

80 60 40

Frequency

20

400

1.5

Index

1.6

1.7

1.8

1.9

2.0

x

1.9

Sample Quantiles

1.7 1.5

1.7

1.9

Normal Q−Q Plot

1.5

x

● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ● ●●● ● ●● ● ● ● ● ● ●● ●●● ● ● ● ●● ●● ● ● ● ● ●● ● ●● ● ● ● ● ●●● ● ●● ● ● ● ●● ●● ●● ●●●● ●● ●●● ● ● ● ● ●●● ●● ● ●● ● ● ●● ● ● ● ●● ● ● ● ●● ●● ● ● ●● ● ● ● ● ●● ●● ●● ● ● ●● ●● ● ● ●● ● ●●●● ●● ●● ● ● ● ●●●● ●●● ● ● ●●● ● ●● ● ●●● ● ●● ● ●●● ● ● ●●● ●● ● ●● ● ● ● ●● ● ● ● ●●●● ●● ● ● ● ● ● ●●●● ●●●●● ● ●● ●● ● ● ●●●●● ● ● ● ● ●● ● ● ● ●● ● ●● ● ●●●●● ● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ●●●● ● ● ●● ● ●● ●● ● ● ●● ● ● ●●●● ●●●● ● ●● ● ● ●● ● ● ●●● ●● ● ●● ●● ● ● ●● ● ●● ● ● ● ●● ●●●●● ● ●● ●● ● ● ●● ●● ● ● ● ● ●●●●●● ● ● ● ● ●●● ● ● ●● ● ●● ●● ●● ●● ● ● ● ● ●● ●●● ● ●●●● ● ● ● ● ● ● ● ●

0

1.5

1.7

1.9

Histogram of x

● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●

What about the BMI?

Reading data

Gender and age

Height and weight

Inference

Grand tour: weight Histogram of x

0

100

200

300

80 60 40

Frequency

20

400

40 50 60 70 80 90

Index

x

Normal Q−Q Plot ●

90 70

Sample Quantiles

● ● ● ●

50

70

90

●

50

x

● ● ● ●● ● ● ● ● ●● ● ●● ● ●● ● ● ● ●● ● ● ● ●●● ●●● ● ●● ● ● ● ●● ●● ● ●●●●● ●● ●● ● ● ●● ● ● ● ● ●●●● ●● ● ●● ●●●●●●● ● ● ●●●● ● ●●● ●●● ●● ● ●● ●● ● ●● ●● ●● ●● ● ● ● ● ● ●●●●●●● ● ● ●● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●●● ● ● ●● ● ● ● ● ●●●● ● ●● ●● ● ● ●●●● ●● ●● ●● ● ● ● ● ●●● ●●●●●● ● ●●● ●●●●● ●●●● ● ● ● ● ●● ●●● ●●● ● ●● ●● ● ● ●● ● ● ●● ●● ●●●● ●● ● ● ●● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ●● ● ●● ● ●●● ● ● ●● ● ● ●●●● ● ●●● ●●● ● ● ● ● ●●●●● ●●●●● ● ● ● ● ●● ●●● ● ●●● ●● ● ● ● ●●● ●●●● ●● ●● ● ● ● ●● ●●● ● ●● ●●● ●● ● ●●● ● ●● ●●● ● ● ● ● ●● ● ●● ●● ●● ●● ● ●● ● ● ● ●● ●●

0

50

70

90

●

● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●

−3

−2

−1

0

1

2

3

What about the BMI?

Reading data

Gender and age

Height and weight

Inference

I am heavy because I am tall :) 1

2 ● ●

1.7

1.8

90

1.5

1.8

3

4

1.7

1.8

1.9

1.9

● ● ●● ● ● ●● ● ● ● ● ● ●●●●●● ● ● ● ●●● ● ●● ● ● ● ● ● ●●● ● ●● ●● ●● ● ● ●●● ● ● ●●● ● ● ●● ● ●● ●● ●● ● ● ●● ● ● ● ● ●●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●●● ● ●● ● ●● ● ● ●● ●● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ●● ●● ● ●●● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●●● ● ●● ● ● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ● ● ● ●●●● ●●● ● ● ● ● ● ● ● ●● ●

100 weight

90 weight

70 50

1.7

height

● ● ●● ●● ● ● ●● ●● ● ● ●● ●●● ●●●●●● ● ●● ● ●●● ●● ● ● ● ● ● ● ● ●● ● ● ●●● ● ● ●● ● ● ● ●● ● ●● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●●●● ● ●●● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●●●● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ●●●● ● ● ●● ●● ●● ● ● ●●● ● ● ●● ● ● ● ● ●● ● ● ●● ● ●●●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●●● ● ●● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ●● ● ● ●

1.6

1.6

height

●

1.5

70

weight

1.9

●

80

1.6

60

1.5

M F MM MM M M M MMMM MM MMM MM M M M F MM MM M M M M MM F M M M M M M M MM FF F M MMM M M M M M F M M F M M M M M M M M M M M M FM M M M F M FM MM M M M MMM MFFM M MMM M MM F F M M F F M M M FM F FMM F M MMM M M FFFF FFFFFFF M M FF M M M F M F M F M M F M M F M F F M M MM MMM M M FF M M M FM FFFM F M M FFFFFF M M F M M F M M M M F FFM F M F M FF M M M F FF M F FFFFFF M F M M F M FF M F FM FM F M F FF M M F F M M F FF FFFM FFF F M FF M FF M F M FFF F FF FM FF F FM FF FF MM M FFFF FF FFFF M M F F F FFFFFF F F F F F F F F F F F FF F

50

●● ● ● ●● ●● ● ●● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●●●●●● ● ● ● ● ●● ● ●● ●● ●● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ●● ●●● ● ●● ● ● ●● ● ● ● ● ●●●●●● ● ● ● ●●● ● ●●● ● ● ● ● ● ●● ● ●● ● ●● ● ●●● ● ● ●●● ●● ●● ● ● ●● ● ●● ● ● ●●● ● ● ●● ● ● ● ●●● ●● ● ● ● ● ● ●● ●● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●●●● ●●●● ● ● ● ● ●● ●● ● ●●● ● ● ● ● ● ● ● ●●●● ● ● ● ●● ● ●● ●● ● ● ●● ●● ● ● ●●● ● ● ●● ● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ●● ●●● ● ● ●●●● ●● ● ● ●● ● ● ●● ●● ● ●

40

70 50

weight

90

●

1.4

1.6

1.8

2.0

What about the BMI?

Reading data

Gender and age

Height and weight

I am heavy because I am tall :) Gender: F Call: lm(formula = y ~ x) Coefficients: (Intercept) -29.63

x 53.58

Gender: M Call: lm(formula = y ~ x) Coefficients: (Intercept) -81.98

x 85.20

Inference

What about the BMI?

Reading data

Gender and age

Height and weight

Inference

I am heavy because I am tall :) 1

2 ● ●

1.7

1.8

90

1.5

1.8

3

4

1.7

1.8

1.9

1.9

● ● ●● ● ● ●● ● ● ● ● ● ●●●●●● ● ● ● ●●● ● ●● ● ● ● ● ● ●●● ● ●● ●● ●● ● ● ●●● ● ● ●●● ● ● ●● ● ●● ●● ●● ● ● ●● ● ● ● ● ●●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●●● ● ●● ● ●● ● ● ●● ●● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ●● ●● ● ●●● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ●● ●● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●●● ● ●● ● ● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ● ● ● ●●●● ●●● ● ● ● ● ● ● ● ●● ●

100 weight

90 weight

70 50

1.7

height

● ● ●● ●● ● ● ●● ●● ● ● ●● ●●● ●●●●●● ● ●● ● ●●● ●● ● ● ● ● ● ● ● ●● ● ● ●●● ● ● ●● ● ● ● ●● ● ●● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●●●● ● ●●● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●●●● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ●● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ●●●● ● ● ●● ●● ●● ● ● ●●● ● ● ●● ● ● ● ● ●● ● ● ●● ● ●●●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ●●● ● ●● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ●● ● ● ●

1.6

1.6

height

●

1.5

70

weight

1.9

●

80

1.6

60

1.5

M F MM MM M M M MMMM MM MMM MM M M M F MM MM M M M M MM F M M M M M M M MM FF F M MMM M M M M M F M M F M M M M M M M M M M M M FM M M M F M FM MM M M M MMM MFFM M MMM M MM F F M M F F M M M FM F FMM F M MMM M M FFFF FFFFFFF M M FF M M M F M F M F M M F M M F M F F M M MM MMM M M FF M M M FM FFFM F M M FFFFFF M M F M M F M M M M F FFM F M F M FF M M M F FF M F FFFFFF M F M M F M FF M F FM FM F M F FF M M F F M M F FF FFFM FFF F M FF M FF M F M FFF F FF FM FF F FM FF FF MM M FFFF FF FFFF M M F F F FFFFFF F F F F F F F F F F F FF F

50

●● ● ● ●● ●● ● ●● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●●●●●● ● ● ● ● ●● ● ●● ●● ●● ●● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ●● ●●● ● ●● ● ● ●● ● ● ● ● ●●●●●● ● ● ● ●●● ● ●●● ● ● ● ● ● ●● ● ●● ● ●● ● ●●● ● ● ●●● ●● ●● ● ● ●● ● ●● ● ● ●●● ● ● ●● ● ● ● ●●● ●● ● ● ● ● ● ●● ●● ● ●● ● ●● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●●●● ●●●● ● ● ● ● ●● ●● ● ●●● ● ● ● ● ● ● ● ●●●● ● ● ● ●● ● ●● ●● ● ● ●● ●● ● ● ●●● ● ● ●● ● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ●● ●●● ● ● ●●●● ●● ● ● ●● ● ● ●● ●● ● ●

40

70 50

weight

90

●

1.4

1.6

1.8

2.0

What about the BMI?

Reading data

Gender and age

Height and weight

Inference

110

Regression

● ●

40 50 60 70 80 90

weight

●

● ● ● ● ● ●●

●

● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●●● ● ●● ●● ●● ● ●● ●● ●● ● ●● ● ●● ● ● ●● ●●●● ●●●●● ● ●● ● ● ● ●●● ● ●●● ● ●● ● ●● ● ● ● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ●●● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ●● ● ● ●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ●●● ● ● ● ● ●●● ● ● ● ●● ● ●● ●● ●●●●●●●● ● ● ● ●● ●●● ● ● ●● ● ● ●● ●● ●● ●●● ●● ●●● ● ● ●● ● ●● ●● ● ● ●●●● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ●●●●● ●●●●● ● ●● ● ●● ● ● ●● ● ● ● ● ● ●● ●● ● ●●● ● ● ●●● ●●●●●● ● ●● ●● ● ● ●●● ● ● ●●●●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ●●●● ● ● ● ● ●●● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●

1.4

1.5

1.6

1.7 height

1.8

1.9

2.0

What about the BMI?

Reading data

Gender and age

Height and weight

Extract coefficients from all models

F M (Intercept) -29.62659 -81.98327 height 53.58033 85.19731

Inference

What about the BMI?

Reading data

Gender and age

Height and weight

Inference

What about the BMI?

Gender and age effects on height and weight

Df gender 1 age 1 Residuals 416 --Signif. codes:

Sum Sq 1.76308 0.01282 1.42642

Mean Sq F value Pr(>F) 1.76308 514.1828 < 2e-16 *** 0.01282 3.7395 0.05382 . 0.00343

0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1

Df Sum Sq Mean Sq F value gender 1 12631 12631.2 156.6954 age 1 188 187.9 2.3305 Residuals 416 33534 80.6 --Signif. codes: 0 '***' 0.001 '**' 0.01

Pr(>F) <2e-16 *** 0.1276

'*' 0.05 '.' 0.1

Reading data

Gender and age

Height and weight

Inference

What about the BMI?

Gender and height effects on weight Call: lm(formula = weight ~ 0 + gender * height) Residuals: Min 1Q -15.8396 -5.1961

Median -0.9167

3Q 4.2347

Max 38.5225

Coefficients: genderF genderM height genderM:height --Signif. codes:

Estimate Std. Error t value Pr(>|t|) -29.627 16.339 -1.813 0.0705 . -81.983 15.882 -5.162 3.80e-07 *** 53.580 9.875 5.426 9.82e-08 *** 31.617 13.294 2.378 0.0178 *

0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1

Residual standard error: 7.931 on 415 degrees of freedom

Reading data

Gender and age

Height and weight

Inference

Plot of predicted values shows interaction

100

● ●

● ● ● ● ● ●●

90

●

80

●

● ●

●

● ●

● ● ● ● ●● ●●● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ●● ● ● ●●● ●● ● ● ● ●● ●●● ● ●●●● ● ● ●● ●● ● ● ● ● ● ● ● ●●● ● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ●●● ● ● ● ● ● ● ●●●● ● ● ●● ● ● ●●● ● ●● ●●● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●●● ● ●● ● ● ●● ●●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ●● ● ●● ● ●● ● ● ●● ●● ● ● ● ●● ● ●● ● ● ● ●●● ●● ●● ● ●● ●●● ●●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ●● ●● ●●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●●● ●●● ● ● ● ● ●● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ●● ● ● ● ● ●●● ● ● ● ●●● ● ● ● ● ●●●● ● ● ●●● ●● ● ● ● ●● ● ●●● ● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●

● ● ● ●

●●

60

70

● ●

50

weight

●

●

●

● ●●

1.5

1.6

1.7 height

1.8

1.9

●

What about the BMI?

Reading data

Gender and age

Height and weight

Inference

What about the BMI?

Student t-test

Welch Two Sample t-test data: height by gender t = -22.6415, df = 416.359, p-value < 2.2e-16 alternative hypothesis: true difference in means is not 95 percent confidence interval: -0.1410314 -0.1184996 sample estimates: mean in group F mean in group M 1.653688 1.783453

Reading data

Gender and age

Height and weight

Inference

Distribution of BMI Histogram of x

0

100

200

300

100 40

Frequency

0

20

x

30

● ● ● ● ● ●●● ● ● ●● ● ●● ● ●● ● ● ● ● ● ● ●●● ● ● ● ●● ● ●● ● ●●●●● ● ● ● ● ● ● ●● ● ● ●●●● ● ●● ●● ●●●● ●●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●● ● ● ●● ●● ● ●● ● ● ●● ● ●● ● ● ●● ● ● ● ● ●●●● ● ●●● ●●● ● ●● ●● ● ● ●● ●● ●● ●●● ● ● ●● ●● ● ● ●● ● ● ● ●● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●● ●● ●● ●● ● ●● ● ● ● ● ● ●●●● ● ● ● ● ●● ● ●● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ●● ●●● ● ● ●● ● ● ●● ● ● ● ● ● ●●● ● ● ●●● ●● ● ● ●●● ● ● ● ● ●●●●●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●● ● ●● ●● ●● ● ● ●● ●●● ● ●● ●● ●●●● ●● ● ●●● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ● ●●● ●● ●● ● ●

400

20

25

Index

30

35

x

30

●

20

30 20

● ● ● ●

Sample Quantiles

Normal Q−Q Plot ●

●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●

−3

−2

−1

0

1

2

Theoretical Quantiles

3

What about the BMI?

Reading data

Gender and age

Height and weight

Inference

Make a new data frame and show correlations

weight height BMI

weight height BMI 1.000 0.653 0.768 0.653 1.000 0.022 0.768 0.022 1.000

What about the BMI?

Reading data

Gender and age

Height and weight

Inference

Plot scattergrams 1.8

1.9

●

● ●●● ●● ● ● ● ●● ●● ● ●● ● ● ●● ● ● ● ● ● ● ●● ●●●●●●● ● ● ●● ●●●●●● ●● ● ● ● ● ●● ● ● ●● ● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ●● ●● ●● ●● ●●●● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ●●●● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ●● ●● ● ● ●● ● ● ● ● ● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ●● ● ●● ●● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ●●●●

height

● ● ● ●●●●● ● ● ●●● ●● ● ● ● ● ● ●● ●● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ●● ●●●● ● ●●●● ●●● ●● ● ●● ● ● ●● ● ●●● ●● ● ●● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●●●● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ●● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●●●● ●● ● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●●● ● ●● ●●● ● ●● ●● ● ● ●● ● ●● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●●●●●● ●●●● ● ● ● ● ● ●●●●● ● ●● ● ●●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ●● ●● ● ●●● ● ●● ●●● ● ● ●●● ● ● ● ●●● ●●●●● ● ● ● ●● ●● ●● ●● ● ●● ● ● ●● ●● ● ●

● ●

●● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ●● ●● ● ● ●● ● ●● ●● ● ● ● ● ●● ● ●●●● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ●●● ● ● ● ●●● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●●● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ●

50

60

70

80

90

●

●

●

● ●

●

30

●

●

●

35

●

●

● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ●● ● ● ●●●● ●●● ● ● ●● ● ● ● ●●● ●● ● ●●● ●● ●● ● ●● ● ● ● ● ● ● ● ●● ●●● ● ● ● ● ●● ● ●● ● ● ●● ● ●● ● ● ●● ● ●● ● ● ● ●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ●● ● ● ●● ● ● ●● ●● ●●● ● ● ●●● ●●●●● ● ●●●● ● ●● ● ●● ● ● ● ●● ● ●● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ●●●● ● ● ● ●●●● ● ● ●● ●● ●●● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ●● ●●● ● ● ● ● ● ●● ●●●●●●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●●● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ●●● ●● ● ● ●●●●● ●●● ● ● ●●● ●

BMI

25

● ● ● ●● ● ● ●● ● ● ●● ●● ● ● ● ●● ● ● ●● ●●●● ● ● ● ●●● ●● ● ● ●● ● ●●● ● ● ● ● ● ●● ●● ●● ●●●● ● ●●● ●●● ●● ● ● ●●●● ● ● ●● ●●● ●● ●● ● ● ● ● ● ●● ● ● ●● ● ●● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ●● ●● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ●●● ● ● ●● ● ● ● ● ● ● ●●● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●●●●● ● ● ● ● ● ●●● ● ● ●● ● ● ●● ● ● ●● ● ●●● ●●● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●● ● ●● ● ● ● ● ●●● ● ● ●●● ●● ●● ●●● ●● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ●● ●● ●● ● ● ● ●● ● ● ● ●● ●●● ● ● ● ● ●●● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●● ● ●

●

● ●● ● ●● ●● ● ●● ● ●● ● ●● ●● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ●●● ●●●● ●● ● ● ● ● ● ● ●● ● ●● ●● ●● ●● ● ●● ● ●● ● ● ●● ●● ● ● ● ●●● ●● ● ● ● ●●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ●●●●●● ● ● ●●● ● ●●● ● ● ●● ●● ● ● ● ● ●● ● ● ●● ● ●●● ● ● ●● ●● ● ● ● ●● ● ● ●● ●● ● ●● ● ● ●● ● ● ● ●●● ●● ● ● ● ● ● ● ●● ●● ●● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ●● ● ●● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●●● ● ●●●●● ●● ● ● ● ● ● ●● ● ●● ●●● ● ● ● ● ● ● ● ● ● ●●●● ● ● ● ●● ● ●● ●● ● ● ●● ●● ● ● ●●● ● ●● ● ●● ●● ● ● ● ● ● ● ● ● ●● ●● ●● ●●● ● ● ●● ● ● ● ●●● ● ● ● ●●●● ● ●● ● ● ● ● ● ●● ●● ● ●

20

1.5

1.7

1.9

weight

●

90

1.7 ●

70

1.6

50

1.5

20

25

30

35

What about the BMI?

Reading data

Gender and age

Height and weight

Inference

What about the BMI?

Distributions of numerical variables height

weight

●

●

100

35

● ●

BMI

● ●

1.9

● ● ● ● ● ●

30

90

● ●

●

●

●

1.8

● ●

●

1.5

50

20

1.6

●

60

70

1.7

25

80

● ●

●

F

M

F

M

F

M

Reading data

Gender and age

Height and weight

Inference

What about the BMI?

Calculated sizes of symbols 1.8

1.9

●

●

●

● ●● ●●

● ● ● ● ●● ●●●●●● ●● ● ● ● ●● ●●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ●●● ● ● ●●●●● ● ●● ● ● ● ●●

● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ●●●● ●● ● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ●

●

● ● ● ●● ● ●●●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ●●● ●●● ● ● ●● ● ● ●● ●● ● ● ● ●

● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●●● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●●● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ●● ● ● ●● ●●● ● ● ● ● ● ●● ●● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●●● ● ●● ●● ● ●● ● ● ●● ● ● ● ●

● ● ● ● ● ●● ● ●

●● ●●● ●● ● ●● ● ●●●●

●

● ● ●●

height

●●

● ●● ●●●● ●●●●● ●

● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●

● ●

●

●●●● ● ● ●● ●● ●● ● ●● ●●

50

60

●

● ●

35

●● ● ● ●●●

● ● ●● ●●● ● ●● ● ● ● ● ● ●● ●● ●● ● ● ● ● ●● ● ● ● ●● ● ●● ● ●● ● ● ● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ●●● ● ●

BMI

● ● ●●●● ● ● ● ●● ● ● ●● ● ●● ● ● ●● ●●●● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ●● ●● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ●● ● ●● ● ●● ●● ●● ●● ● ● ●● ● ●● ● ● ● ●● ●●● ● ●● ●●●

●●

●

●

●●

●

●●● ●●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●●● ●● ● ● ● ●● ● ● ● ● ●● ●

● ● ● ●● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●● ● ● ● ● ● ●

●

30

● ● ●

●● ●

●

●● ●

● ●● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ●●● ●●●● ● ● ● ● ● ●● ● ● ● ● ● ● ●

●

●●

● ● ● ● ●●● ● ●

● ● ●

● ● ● ● ●●●●● ●● ● ● ● ● ●●●● ●●● ●● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●●● ● ●● ● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ●● ●●● ● ●● ●● ●● ●●● ● ●● ●

●

● ●

●

●

25

1.5

1.7

1.9

●

●

20

weight

● ● ●●● ●

●● ● ●●● ●● ● ●● ●● ●● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●●● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ●

90

1.7

70

1.6

50

1.5

●

● ●●

70

80

90

20

25

30

35

Reading data

Gender and age

Height and weight

Inference

What about the BMI?

BMI classes

> bmic <- cut(BMI, c(0, 13, 18, 25, 30, Inf)) > levels(bmic) [1] "(0,13]"

"(13,18]"

"(18,25]"

"(25,30]"

"(30,Inf

> levels(bmic) <- c("S", "s", "N", "h", "H") > bmic <- factor(bmic, levels = c("S", "s", "N", "h", "H + ordered = T) > is.ordered(bmic) [1] TRUE

Reading data

Gender and age

Height and weight

Inference

What about the BMI?

Color coded BMI classes 1.8

1.9

●

●

●

● ●● ●●

● ● ● ● ●● ●●●●●● ●● ● ● ● ●● ●●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ●●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ●●●●● ●●● ● ● ●●

● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ●● ● ● ● ●●●● ●● ● ● ● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ●● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ●

●

● ● ● ●● ● ●●●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ● ● ●● ●● ● ● ●●● ●●● ● ● ●● ● ● ●● ●● ● ● ● ●

● ●

●

●

● ● ●● ● ● ● ●● ● ● ● ● ● ● ●●● ● ● ●● ● ● ● ● ● ●● ● ● ●● ●● ● ● ●● ● ● ●●● ● ● ● ● ● ●●● ● ● ● ●● ●● ● ● ●● ● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ●● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ●●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ● ●●

● ● ●●

●

●

●●

●

● ● ● ● ●●● ● ●

● ● ●

● ●● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ●● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ●● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ●●●● ● ● ● ● ●● ● ● ● ● ● ● ●

● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●●● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●●

● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ●● ● ● ● ●

● ●● ● ●●● ●● ● ●● ● ●

50

60

●

● ●

●● ● ● ●●●

● ● ●● ●●● ● ●● ● ● ● ● ● ●● ●● ●● ● ● ● ● ●● ● ● ● ●● ● ●● ● ●● ● ● ● ●● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●●● ● ● ●●

80

90

●

●

BMI

● ● ●●●● ● ● ● ●● ● ● ●● ● ●● ● ● ●● ●●●● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ●● ●●● ● ● ● ● ● ● ●● ● ● ●● ●● ●● ● ● ●● ● ●● ● ●● ● ●● ● ● ● ●● ●● ●●● ●

●● ● ● ● ● ● ● ● ●● ●● ● ●● ● ●● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ●● ●● ● ● ●●

70

●

●●

●

● ●● ● ● ●● ● ● ● ● ●●● ●● ●

●●●● ● ● ●● ●● ●● ● ●● ●●

●● ●

●

●● ●

● ●

●

●●

35

1.5

● ●●

height

30

1.7

●

● ●

● ● ●

● ● ● ● ●●●●● ●● ● ● ● ● ●●●● ●●● ●● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●●●● ● ●● ● ● ● ● ●●● ● ● ● ● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ●● ●● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ●● ● ● ● ●● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ●● ● ● ● ● ● ● ● ● ●● ● ● ●● ● ● ● ●● ● ● ● ● ● ●● ●●● ● ●● ●● ●● ●●● ● ●● ●

● ● ● ●

●

●

●●

20

1.9

●

● ● ● ● ● ●● ● ●

●● ●●● ●● ● ●● ● ●●●●

●

25

weight

● ● ●●● ●

●● ● ●●● ●● ● ●● ●● ●● ● ●● ● ● ●● ● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ●● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ●● ● ● ●● ●● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ●● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●●● ● ● ● ●● ● ● ●

90

1.7

70

1.6

50

1.5

●

20

25

30

35

Reading data

Gender and age

Height and weight

Inference

What about the BMI?

150

Barplots are easy to understand ...

0

50

100

F M

S

s

N

h

H