In: Statistics and Probability
Show the R inputs and the answers to the questions if asked please
# Q1. Generate 10 random numbers from a uniform distribution on [0,10]. Use R to find the maximum and minimum values.
# Q2. Generate 10 random normal numbers with mean 5 and standard
deviation 5 (normal(5,5)). How many are less than 0 (Use R)?
# Q3. Generate 100 random normal numbers with mean 100 and standard
deviation 10. How many are 2 standard deviations from the mean
(smaller than 80 or bigger than 120)?
# Q4. As part of a professional skills program, a 4-H club tests
its members for typing proficiency. Dr. Katz wants to test his
studentsâ mean typing speed against a nominal speed of 40 words per
minute with confidence interval of 95%. Speed recorded by different
students is (35, 50, 55, 60, 65, 60, 70, 55, 45, 55, 60, 45, 65,
55, 50, 60). For each of the following, answer the question, and
show the output from the analyses you used to answer the
question.
# a. What was the mean typing speed?
# b. Create a histogram and answer if the data distribution is
reasonably normal?
# c. Was the mean typing speed significantly different from the
nominal rate of 40 words per minute?
# d. What do you conclude practically? Include a description of the
difference from the mean. If they are different, which is
higher?
# Q5. As part of a professional skills program, a 4-H club tests
its members for typing proficiency. Dr. Katz and Laura want to
compare their studentsâ.. mean typing speed between their
classes.
# katz_students (35, 50, 55, 60, 65, 60, 70, 55, 45, 55, 60, 65,
55, 50, 60, 70)
# lauras_students (55, 60, 75, 65, 60, 70, 75, 70, 70, 65, 72, 73,
65, 80, 50, 55)
# a. What was the mean typing speed for each class?
# b. Create histograms to answer this question: Are the data
distributions for each sample reasonably normal?
# c. Was the mean typing speed significantly different between the
classes?
# d. What do you conclude practically? Include a description of the
difference between the means of the data. If they are different,
which is higher?
# Q6. Based on test scores, can we see if there is a difference
between the scores in pretest compared to the posttest? The data
is
# prestest: 3 0 5 2 5 5 5 4 4 5
# postest: 2 1 4 1 4 3 3 2 3 5
# a. What was the mean score for each grader?
# b. Are the data distributions for each sample reasonably
normal?
# c. Was the mean score different between the graders?
# d. Plot a histogram of differences between pretest and posttest
scores.
# e. What do you conclude practically? Include a description of the
difference between the means of the data. If they are different,
which is higher?
Solution4:
Rcode
speed <- c(35, 50, 55, 60, 65, 60, 70, 55, 45, 55, 60, 45, 65,
55, 50, 60)
mean(speed)
hist(speed)
qqnorm(speed)
qqline(speed)
shapiro.test(speed)
t.test(speed,mu=40)
Solution4a:
a. What was the mean typing speed?
mean typing speed=55.3125
# b. Create a histogram and answer if the data distribution is reasonably normal?
The distribution is normal as we observe symmertical shape from histogrm
Also from QQ plot(pints are most on the straight line)and shapiro test it confirms normal distribution.
c. Was the mean typing speed significantly different from the nominal rate of 40 words per minute?
we conduct t test
H0: mu=40
Ha: mu not = 40
Output:
One Sample t-test
data: speed
t = 6.925, df = 15, p-value = 4.853e-06
alternative hypothesis: true mean is not equal to 40
95 percent confidence interval:
50.59948 60.02552
sample estimates:
mean of x
55.3125
t= 6.925
p= 4.853e-06
p<0.05
Reject H0
Accept Ha.
Conlcusion:
there is sufficient statistical evidence at 5% level of significance to conclude that
he mean typing speed significantly different from the nominal rate of 40 words per minute.
What do you conclude practically? Include a description of the difference from the mean. If they are different,
there is sufficient statistical evidence at 5% level of significance to conclude that
he mean typing speed significantly different from the nominal rate of 40 words per minute.
sample mean=xbar=55.3125 is higher than 40.