You are on page 1of 4

Name ____Kelsey Kremer_____________

Statistics Exam SOSCI 210 Fall 16


Instructions: Download this word document and use this word document to present your final
solutions to each problem or task below. Create a separate text file, and use that text file to
record the code you use for each problem. In general, I recommend you write your code in the
text file first, then COPY it (do not cut it) into R. If there is a problem, fix your code in the text
document and try again. The text document should contain the code you write to solve each
problem and not contain extra or failed coding attempts. Code should be clearly labeled for each
problem. Print this document with your neat and complete solutions, and then print and attach
the text file with the code to the back.
#1) Basic tasks. (1) each
Create a vector with 10 randomly drawn numbers from a chi-square distribution with 15 degrees
of freedom. What are your 10 numbers? (2 decimal places is sufficient)
Answer: 13.40, 15.43, 13.94, 17.57, 7.97, 12.46, 9.64, 14.90, 7.33, 19.55
What is the expected value of a chi-square (15) random variable? (this question does not need R)
Answer: The expected value of a chi-square(15) random variable is 15.
What is the variance of a chi-square (15) random variable? (this question does not need R)
Answer: the variance of a chi-square(15) random variable is 30.
Find the sample average of your 10 random numbers.
Answer: sample average = 13.219
Find the sample variance of your 10 random numbers.
Answer: sample variance = 15.87748
What is the range of your random numbers?
Answer: range = 7.33 to 19.55, or 12.22

2) Finding the probability of specific outcomes in discrete distributions. (1) each


Find the probability that I flip exactly 25 heads out of 50 coin flips.
Answer: probability of getting exactly 25 heads= 0.1122752
Find the probability that it takes me exactly 3 tries to succeed in a task with a 10% chance of
success.
Answer: probability that it takes exactly 3 tries to succeed with a 10% chance of success =
0.0729
Find the probability that there are exactly 8 named storms in a year if we know named storms
occur at a rate of 10.1 per year.
Answer: probability that there are exactly 8 storms if we know they occur at a rate of 10.1/year =
0.1103256

3) Drawing distributions. HINT: use type= h for discrete distributions and type= l for
continuous distributions. (2) each
Create a good graph of the Binomial distribution with 6 trials and a 65% chance of success

Create a good graph of a Poisson distribution with a rate of 1.2

Create a good graph of a Geometric distribution for an event with a 3% chance of success.
(because of technical reasons, begin your support sequence at 0 for this problem)

Create a good graph of an exponential distribution with rate .15

Create a good graph of a normal distribution with mean 75 and standard deviation 7.
Remember that R wants you to input the standard deviation and not the variance.

Create a good graph of the chi-square distribution with 4 degrees of freedom.

Create a good graph of an F-distribution with 9 degrees of freedom in the numerator and 19
degrees of freedom in the denominator.

4) Finding probabilities for a range of outcomes. (1) each


Find the probability that I get 3, 4, 5, 6, or 7 heads when I flip a coin 10 times.
Answer: probability of getting 3-7 heads when flipping a coin 10 times = 0.890625
Find the probability that I take 10 or more tries to get my first success at a task with a 5% chance
of success.
Answer: The probability that it takes 10 or more tries to get your first success at a task with a 5%
chance of success = 0.5688001
Find the probability that I wait over one hour for an event that typically occurs 2.8 times per
hour.
Answer: the probability that you would wait over an hour for an event that typically occurs 2.8
times an hour = 0.06081006
If X ~ N(0,1) find the probability that X is between -2 and 2. P(-2 < X < 2)
Answer: probability that x is between -2 and 2 = 0.9759

Find the probability that an F(4, 95) random variable is greater than 3.
Answer: probility that an F(4,95) random variable is greater than 3 = 0.02225085

You might also like