Exercise

# The t distribution

Often when comparing means of continuous variables we use a t distribution instead of the normal distribution. The main reason to use the t distribution here is because we often have to deal with small samples.

Now image the following example of height: They say that Dutch people are among the tallest in the world with an average male height of 185 centimeters with a standard deviation of 5 centimers. We take a sample of 50 males from this population and find an average height of 186.5 centimeters which is above the population mean. Imagine we want to do a one-sided hypothesis test where we check whether the population mean of Dutch male height is larger than 185 and we use a significance level of 0.05. There are several things we can do now and 1 thing that we must do.

Firstly, we need to calculate the degrees of freedom which refers to the amount of independent samples in the set of data, which is equal to the sample size - 1. Thus, the degrees of freedom here is \(50 - 1 = 49\). Secondly, we could either calculate the associated p value or, alternatively, we could calculate the critical cut-off value. The critical cut-off value in this case is the 95th percentile as we are doing a one-sided hypothesis test.

Instructions

**100 XP**

- Calculate the critical cut-off value using the
`qt()`

function given the fact that we perform a one-sided hypothesis test with a significance level of 0.05. Round this value to two digits and store it in a variable called`cut_off`

. You can look up the help documentation of this function by typing`help(qt)`

in the console. - Print the value of
`cut_off`

to the console.