Data Mining Question 1: Suppose that a hospital tested the age and body fat data for 18... Suppose that a hospital tested the age and body fat data for 18 randomly selected adults with the following results: age 23 23 27 27 39 41 47 49 50 %fat 9.5 26.5 7.8 17.8 31.4 25.9 27.4 27.2 31.2 age 52 54 54 56 57 58 58 60 61 %fat 34.6 42.5 28.8 33.4 30.2 34.1 32.9 41.2 35.7 (a) Calculate the mean, median, and standard deviation of age and %fat. (b) Draw the boxplots for age and %fat. Solution: a) For Age: Sorted values: 23, 23, 27, 27, 39, 41, 47, 49, 50, 52, 54, 54, 56, 57, 58, 58, 60, 61 Median= (50+52)/2=51 Items= N=18 Sum of all ages=Σx=836 Mean=μ= 836/14=46.44 Standard Deviation (σ): σ2 = Σ(xi – μ)2/N = (23 – 46.4)2 + … + (61 – 46.4)2 /18 = 2970.44/18 = 165.02 σ = √165.02 = 12.84 For Fat: Sorted values= 7.8, 9.5, 17.8, 25.9, 26.5, 27.2, 27.4, 28.8, 30.2, 31.2, 31.4, 32.9, 33.4, 34.1, 34.6, 35.7, 41.2, 42.5 Median= (30.2+31.2)/2=30.7 N=18 Sum= Σx=518.1 Mean= μ=28.78 Standard Deviation (σ) : σ2 = Σ(xi – μ)2/N = (7.8 – 28.78)2 + … + (42.5 – 28.78)2 /18 = 1455.94 = 80.88 σ = √80.88 = 8.99 b) Box plots: