Skip to content
Justice Tech School

Probability Distributions

d, p, q and r prefixes give density, probability, quantile and random values.

Example
print(round(dnorm(0), 4))
print(round(pnorm(1.96), 3))
print(round(qnorm(0.975), 2))
set.seed(1)
print(round(mean(rnorm(1000, mean = 5)), 1))

Exercise

Random normal.

(10)

Quiz Test

What does the r prefix mean?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.