HW5 - data = rnorm(10000, 30, 5) The new function that...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
PSYCH 240 Stats Assignment V Don’t forget to show me your work!! Good luck _ 1. (3pts) If scores are normally distributed with a mean of 35 and a standard deviation of 10, what percent of the scores is: (a) greater than 34? > 1-pnorm(34,35,10) [1] 0.5398278 (b) smaller than 42? > pnorm(41,35,10) [1] 0.7257469 (c) between 28 and 34? > pnorm(34,35,10)-pnorm(27,35,10) [1] 0.2483168 2. (3pts) (a) What proportion of a normal distribution is within one standard deviation of the mean? > pnorm(1)-pnorm(-1) [1] 0.6826895 (b) What proportion is more than 2.0 standard deviations from the mean? > 1-pnorm(2) [1] 0.02275013 (c) What proportion is between 1.25 and 2.1 standard deviations above the mean? > pnorm(2.1)-pnorm(1.25) [1] 0.08778535 3. (4pts) A normal distribution has a mean of 20 and a standard deviation of 4. Find the Z scores for the following numbers: (a) 28 (b) 18 (c) 10 (d) 23 > x=c(28,18,10,23) > x=(x-20)/4 > x [1] 2.00 -0.50 -2.50 0.75 R Exercises (5pts): 4. We'll start out by making a fake data set of 10,000 observations, which are normally distributed with mean = 30 and standard deviation = 5, as follows:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: data = rnorm(10000, 30, 5) The new function that you'll need to use is the sample() function. This function simply takes a random sample, of a size you specify, from a variable. To take a sample of size 8 from data (we'll label this S1), you'd do this: S1 = sample(data, 8) (a) Take 10 samples of size 8 from data; you can call them S1, S2, and so on. Find the mean of each one, using the mean() command. (E.g., to get the mean of sample1, you'd just type m1 = mean(S1).) Put these means together into a new variable, called sample_means, as follows: sample_means = c(m1, m2, . ...) Finally, make a histogram of sample_means. Show it in your assignment. (b) Do exactly the same thing again, but now use samples of size 25. What's different about your histogram? (c) Do it again with samples of size 8, but now take 25 samples rather than 10. What's different about your histogram? (d) Explain, in words, what general principles are illustrated by problems 1-3....
View Full Document

This note was uploaded on 12/08/2009 for the course PSYCH 240 taught by Professor Harvey during the Spring '08 term at UMass (Amherst).

Page1 / 2

HW5 - data = rnorm(10000, 30, 5) The new function that...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online