PC Labs for SO5041: Week 5

Table of Contents

Week 5 Lab: the Normal Distribution

Normal Distribution

Table 1: Table of the Standard Normal Distribution: Right tail (probability of X>z)
  0.00 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09
0.00 0.500 0.496 0.492 0.488 0.484 0.480 0.476 0.472 0.468 0.464
0.10 0.460 0.456 0.452 0.448 0.444 0.440 0.436 0.433 0.429 0.425
0.20 0.421 0.417 0.413 0.409 0.405 0.401 0.397 0.394 0.390 0.386
0.30 0.382 0.378 0.374 0.371 0.367 0.363 0.359 0.356 0.352 0.348
0.40 0.345 0.341 0.337 0.334 0.330 0.326 0.323 0.319 0.316 0.312
0.50 0.309 0.305 0.302 0.298 0.295 0.291 0.288 0.284 0.281 0.278
0.60 0.274 0.271 0.268 0.264 0.261 0.258 0.255 0.251 0.248 0.245
0.70 0.242 0.239 0.236 0.233 0.230 0.227 0.224 0.221 0.218 0.215
0.80 0.212 0.209 0.206 0.203 0.200 0.198 0.195 0.192 0.189 0.187
0.90 0.184 0.181 0.179 0.176 0.174 0.171 0.169 0.166 0.164 0.161
1.00 0.159 0.156 0.154 0.152 0.149 0.147 0.145 0.142 0.140 0.138
1.10 0.136 0.133 0.131 0.129 0.127 0.125 0.123 0.121 0.119 0.117
1.20 0.115 0.113 0.111 0.109 0.107 0.106 0.104 0.102 0.100 0.099
1.30 0.097 0.095 0.093 0.092 0.090 0.089 0.087 0.085 0.084 0.082
1.40 0.081 0.079 0.078 0.076 0.075 0.074 0.072 0.071 0.069 0.068
1.50 0.067 0.066 0.064 0.063 0.062 0.061 0.059 0.058 0.057 0.056
1.60 0.055 0.054 0.053 0.052 0.051 0.049 0.048 0.047 0.046 0.046
1.70 0.045 0.044 0.043 0.042 0.041 0.040 0.039 0.038 0.038 0.037
1.80 0.036 0.035 0.034 0.034 0.033 0.032 0.031 0.031 0.030 0.029
1.90 0.029 0.028 0.027 0.027 0.026 0.026 0.025 0.024 0.024 0.023
2.00 0.023 0.022 0.022 0.021 0.021 0.020 0.020 0.019 0.019 0.018
2.10 0.018 0.017 0.017 0.017 0.016 0.016 0.015 0.015 0.015 0.014
2.20 0.014 0.014 0.013 0.013 0.013 0.012 0.012 0.012 0.011 0.011
2.30 0.011 0.010 0.010 0.010 0.010 0.009 0.009 0.009 0.009 0.008
2.40 0.008 0.008 0.008 0.008 0.007 0.007 0.007 0.007 0.007 0.006
2.50 0.006 0.006 0.006 0.006 0.006 0.005 0.005 0.005 0.005 0.005
2.60 0.005 0.005 0.004 0.004 0.004 0.004 0.004 0.004 0.004 0.004
2.70 0.003 0.003 0.003 0.003 0.003 0.003 0.003 0.003 0.003 0.003
2.80 0.003 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.002
2.90 0.002 0.002 0.002 0.002 0.002 0.002 0.002 0.001 0.001 0.001
3.00 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001
3.10 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001
3.20 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001 0.001
3.30 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000

Note: As an alternative to the printed table, use the following app: https://teaching.sociology.ul.ie/apps/snd/

Using the following app: https://teaching.sociology.ul.ie/apps/snd/ or table 1, answer the following questions:

  • Suppose you know that height of adult women in Ireland is normally distributed with mean 165cm and standard deviation 9cm:
    1. If you pick a woman at random, what is the chance she will be over 175cm?
    2. What proportion of women are less than 170cm?
    3. What is the chance a randomly chosen woman will be shorter than 150cm?
    4. What proportion of women are between 155cm and 160cm?

Working backwards

In a particular class, exam scores are normally distributed with mean 65 and standard deviation 7:

  1. What score corresponds with the 95th percentile?
  2. What score corresponds with the 50th percentile?
  3. What score corresponds with the 25th percentile?

Online practice

Practice with the following online exercises:

Functions in R

Using R, the qnorm() function gives you the z value for a given propability (where z is the value with p below it). The pnorm() function does the reverse, giving the z value that corresponds with a given probability. We can also use the dnorm() (normal density) function to draw the normal curve: the density corresponds with the height of the curve.

Play around with pnorm() and qnorm() to see how to get the same results as in the app.

See if you can get this code to work, to draw the normal distribution:

library(dplyr)
library(ggplot2)

## X axis values
x = seq(-4, 4, 0.1)

## Put it in a tibble or dataframe (ggplot likes tibbles)
df = tibble(x=x)

## For each value of x, calculate the density, dnorm(x), saving in the tibble
df$d = dnorm(df$x)

## Draw the graph
ggplot(df, aes(x=x, y=d)) + geom_line() + ggtitle("Normal Distribution") + xlab("Z") + ylab("Probability density")