Chapter 3 Quiz 1 (Quiz on Feb 3rd.)

The data on maximum temperature (in Fahrenheit) for 16 days in Santa Cruz are provided below.

37.8,52.9,43.7,46,27,81,14,48.5,43.7,45.9,50.3,56,46,43.7,31.2,36.4

Exercise 3.1 What is the mean temperature?

By definiction, the sample mean is ˉX=ni=1xin=37.8+52.9++36.416=44.0062544.01

Exercise 3.2 What is the median temperature?
## [1] 14.0 27.0 31.2 36.4
## [1] 37.8 43.7 43.7 43.7
## [1] 45.9 46.0 46.0 48.5
## [1] 50.3 52.9 56.0 81.0

Therefore, the median is by definition 43.7+45.92=44.8

Exercise 3.3 What is the mode of the sample?
## x
##   14   27 31.2 36.4 37.8 43.7 45.9   46 48.5 50.3 52.9 
##    1    1    1    1    1    3    1    2    1    1    1 
##   56   81 
##    1    1

The mode is 43.7 because it shows up three times.

Exercise 3.4 What is the variance of the sample

By definition, the variance is S2=ni=1(xiˉx)2n1=(37.844.01)2+(52.944.01)2++(36.444.01)2161207.538

Exercise 3.5 What is the coefficient of variation?

By definition, it is

sˉx×100%=207.3844.01×100%32.73%

Exercise 3.6 What is the interquartile range of the sample?

First, compute the first quartile as 1QR=36.4+37.82=37.1 then the third quartile is 3QR=48.5+50.32=49.4 Hence, the interquartile range is IQR=3QR1QR=49.437.1=12.3

Exercise 3.7 Using either of the outlier detection method, check if the temperature value 81 is an outlier of this sample.

Method 1: Z-score First compute the z-score as Z=XˉXS=8144.01207.5382.568>2 This is an outlier!

Method 2: LF/UF The LF is given by LF=Q11.5×IQR=37.11.5×12.3=18.65 and the UF is given by UF=Q3+1.5×IQR=49.4+1.5×12.3=67.85 Because 81>67.85, this is an outlier!

Exercise 3.8 Find the correct option in the following multiple choice questions.

  • If a doctor records pain of a patient in the scale of 1-5, he is measuring a variable that is

    1. ordinal

    2. nominal

    3. interval

  • In a city every household has between 1-5 people. The number of people in a household is a variable that is

    1. ordinal

    2. nominal

    3. interval