Generates a random sample of scores from a normal distribution with a specified population mean and standard deviation. This function is useful for generating hypothetical data for classroom demonstrations.
random.y(n, m, sd, min, max, dec)
sample size
population mean of scores
population standard deviation of scores
minimum allowable value
maximum allowable value
number of decimal points
Returns a vector of randomly generated scores.
random.y(10, 3.6, 2.8, 1, 7, 0)
#> [1] 4 4 4 2 6 5 6 5 3 7
# Should return:
# [1] 2 7 7 1 6 3 1 3 2 1