Assignment 5
1. The command “rnorm” generates random numbers from a normal distribution. The numbers are based on the normal distribution.
Create a vector of 10 numbers using the mean of 100 and a standard deviation of 1. Find the mean and standard deviation of the vector. (Cut and paste your work.) (5 pts.)
mean = 100.0937, rounded to two decimal points = 100.09
standard deviation = 0.9907208, rounded to two decimal points = 0.99
Repeat the process from above, but change the standard deviation from 1 to 10. Find the mean and standard deviation of the new vector. Characterize the change. (5 pts.) (What happened?) What does that say about scores with larger variations? (5 pts.) Cut and paste the output here (5 pts.)
mean = 103.0769, rounded to two decimal points = 103.08
standard deviation = 10.13575, rounded to two decimal points = 10.14
As the standard deviation got greater, the amount of variance increased. This can be seen through both the mean score and the standard deviation. This means that scores with larger variations will inherently have more variance to them.
Repeat the process from above, but now change the number of output elements from 10 to 100. Characterize the change. (5 pts.) (What happened?) What does that say about sample size? (5 pts.)
mean = 100.4904, rounded to two decimal points = 100.49
standard deviation = 9.855311, rounded to two decimal points = 9.86
The outputs are closer to the defined parameters. Furthermore, as the sample size gets larger the distribution pulls toward the mean.
2. A researcher wants to know if people on vacation, engage in an “inner dialogue” less than when working. The researcher selects a starts by obtaining a sample of 10 individuals who are about to go on a week’s vacation and agree to note (on an app) each time they “hear” themselves mentally talking. Each person in the sample is asked to keep a log for the week. The daily average instances (based on the week) appears below.
Create a vector with the following observations (3 pts.) 50, 40, 46, 49, 40, 58, 45, 47, 46, 43 Complete a one-sample t-test where the population mean is 50. (Cut and paste the output.)
a) What is the t-value? (3 pts.) t = -2.1583, rounded to two decimal points = -2.16
b) What is the p-value? (3pts.) p-value = 0.05923, rounded to two decimal points = 0.06
c) What is your interpretation of the Null Hypothesis Significance Test? (3 pts.) As the p-value is greater than 0.05, we can say that the results are not statistically significant. Thus, we fail to reject the null hypothesis. This means that according to our defined statistically significant p-value of 0.05, it suggests that the null hypothesis holds. However, our p-value is close to being statistically significant
d) This is a one-tailed t-test. In which direction (as compared to the mean)? (3pts.) Toward the left of the mean because we want to see if they do inner dialogues less than they do while they are working.
e) Could this experiment be converted to a two-tailed t-test? If so, state the hypothesis. (5pts.)
Yes. The hypothesis would be if the researchers wanted to know if people on vacation, engage in an “inner dialogue” differently (more often or less often, i.e change) when they are working.
3. From the experiment in (2), the researcher also obtains data from a second sample (of the same size) from individuals during a regular week of work. The daily average instances (based on a week of data) of inner dialogue appear below.
Create a vector with the following observations (3 pts.) 53, 40, 51, 50,43, 62, 49, 47, 51, 39
Complete a two-sample independent t-test of your first vector against the second. (Cut and paste the output.)
Vacation against work
Engage in inner dialogue less in vacation than in work.
What is the t-value? (3 pts.) t = -0.77378, rounded to two decimal points = -0.77
What is the p-value? (3pts.) p-value = 0.4491, rounded to two decimal points = 0.45
What is your interpretation of the Null Hypothesis Significance Test? (3 pts.) As the p-value is significantly greater than 0.05, we can say that the results are not statistically significant. This means that we fail to reject the null hypothesis.
This is a one-tailed t-test. In which direction (as compared to the mean)? (3pts.) Toward the right
Could this experiment be converted to a two-tailed t-test? If so, state the hypothesis.(5pts.) Yes: The mean inner dialogue of working and vacationing is different.
4. Redo the t-test above, but instead of a two-sample, independent t-test, compute the t-test as a paired samples t-test. (Assume that the same people are measured during vacation and then again at a later time during a workweek. (Cut and paste the output.)
a) What is the t-value? (3 pts.) t = -2.3333, rounded to two decimal points = -2.33
b) What is the p-value? (3pts.) p-value = 0.0445, rounded to two decimal points = 0.04
c) What is your interpretation of the Null Hypothesis Significance Test? (3 pts.) As the p-value is less than 0.05, we can say that the results are statistically significant. This means that the alternative hypothesis is more likely to be true than the null hypothesis, thus we reject the null hypothesis.
d) Compared to the two-sample, independent t-test, what changed? (3 pts.) We are now assuming that each observation comes from the same participant. Therefore, the t values are now different. Essentially we first look at the difference in performance in the two conditions, then using the differences we utilize a one sample t-test again. As a result our t values our much stronger.
e) What explains the change? (7 pts.)
We are now looking at the difference between the performance (inner dialogue when on vacation vs when working) in regards to each participant at two different time points.