{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW5 - data = rnorm(10000 30 5 The new function that you'll...

Info icon This 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:
Image of page 1

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

View Full Document Right Arrow Icon
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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern