0% found this document useful (0 votes)
86 views4 pages

Assignment06 1

This document contains instructions for completing 4 assignments involving statistical analyses: 1. Checking if a variable is normally distributed using normality tests and confidence intervals. 2. Creating a 95% confidence interval for sleep averages and determining if it includes the recommended average. 3. Conducting a one-sample t-test to determine if baby weights are lower than average. 4. Performing another one-sample t-test to see if height differs from a proposed average. The assignments involve applying statistical tests like the Shapiro-Wilk normality test and t-tests, interpreting p-values and confidence intervals, and making conclusions about null hypotheses.

Uploaded by

Naresh Suwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views4 pages

Assignment06 1

This document contains instructions for completing 4 assignments involving statistical analyses: 1. Checking if a variable is normally distributed using normality tests and confidence intervals. 2. Creating a 95% confidence interval for sleep averages and determining if it includes the recommended average. 3. Conducting a one-sample t-test to determine if baby weights are lower than average. 4. Performing another one-sample t-test to see if height differs from a proposed average. The assignments involve applying statistical tests like the Shapiro-Wilk normality test and t-tests, interpreting p-values and confidence intervals, and making conclusions about null hypotheses.

Uploaded by

Naresh Suwal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Assignment 06

1. Normality Test: To complete this homework, you will need the dataset Kinesiology_1.csv which you
will find on Moodle.

a) Check to see if the variable HR follows a normal distribution. Formulate the appropriate hypothesis
and report the corresponding p-value. What is your verdict?
H0: The variable HR is normally distributed.
Ha: The variable HR is not normally distributed.
α = 0.05
> Data <- read.csv("Kinesiology_1.csv")
> Data_HR <- Data$HR
> df <- data.frame(y = Data_HR)
> p <- ggplot(df, aes(sample = y)) +
+ stat_qq() +
+ stat_qq_line() +
+ theme_classic()
>p
> shapiro.test(Data_HR)

Shapiro-Wilk normality test

data: Data_HR
W = 0.96431, p-value = 0.07662

From Shapiro-Wilk test, the critical value is 0.96431 and the p-value is 0.07662. Here,
0.07662 > α, we cannot reject the null hypothesis. There is insufficient evidence to
claim that HR is not normally distributed.

b) Repeat (a) only for 5_min and then only for 15_min.
5_min:
H0: HR is normally distributed for the REST group 5_min.
Ha: HR is not normally distributed for the REST group 5_min.
α = 0.05
> shapiro.test(Data_HR_5)

Shapiro-Wilk normality test

data: Data_HR_5
W = 0.91906, p-value = 0.1864

Using the Shapiro-Wilk test, the critical value is 0.91906 and the p-value is 0.1864. Here,
0.1864 > α, we cannot reject the null hypothesis. There is insufficient evidence to claim that
HR is not normally distributed for the REST group 5_min.

15_min:
H0: HR is normally distributed for the REST group 15_min.
Ha: HR is not normally distributed for the REST group 15_min.
α = 0.05

> shapiro.test(Data_HR_15)

Shapiro-Wilk normality test


data: Data_HR_15
W = 0.96845, p-value = 0.8345

Using the Shapiro-Wilk test, the critical value is 0.96845 and the p-value is 0.8345. Here,
0.8345 > α, we cannot reject the null hypothesis. There is insufficient evidence to claim that
HR is not normally distributed for the REST group 15_min.

2. Confidence interval using the T distribution: It is recommended that the average hours of sleep an
adult should receive daily is 8. As a graduate student, this can be difficult to achieve some times. The
following is a set of 10 measurements from my sleep schedule the past 10 days:

3 6 7 7 6 5 7 3 6 8

a) Create a 2 tailed 95% confidence interval with the mean and standard error of the above dataset
using a T-distribution.
> a <- c(3,6,7,7,6,5,7,3,6,8)
> describe (a)
𝝈
𝒔=
√𝒏
𝟏.𝟔𝟗
Since, 𝝈 = 𝟏. 𝟔𝟗 and n = 10, we have 𝒔 = = 𝟎. 𝟓𝟑𝟒𝟒 , x̅ = 5.8
√𝟏𝟎
[x̅ - t9, 0.025 *(SE), x̅ + t9, 0.025 *(SE)]
[5.8 – 2.262(.5344), 5.8 + 2.262(.5344)]
[4.5911, 7.008]

b) Why is it better to use a T-distribution in this example?


We do not know the population standard deviation and the sample size is less than thirty.
c) Does the recommended average fall in that confidence interval? What does that imply, or what
would you say based on that?
The recommended average hours of sleep do not fall in the confidence interval. Hence, we
reject null hypothesis. The sample average is different that the population average. Here, the
recommended average of sleep is higher than the sample average and confidence interval, it
can be concluded that graduate student is not getting enough sleep with given data.

(In this question, you can use a software to compute some descriptive statistics, but you should complete
the problem by hand)

3. One-Sample T-test: The US CDC reports that the average weight of healthy 12-hour-old infants is
7.5 lb. A sample of 10 newborn babies from a low-income neighborhood yielded the following weights (in
pounds) at 12 hours after birth:

6.0 8.6 7.5 8.2 8.0 8.1 6.4 6.0 7.2 4.8

The researcher wants to know if we can conclude that babies from this neighborhood are underweight with
α = 0.01.
a) Write the null and alternate hypotheses.
Ho: The babies from low-income neighborhoods weighted same as the population
infant weight of 7.5lbs.
Ho: µ = 7.5
H1: The babies from low-income neighborhoods weigh less than 7.5lbs.
H1: µ < 7.5
b) The researcher argues that a one-sided test is needed. Can you support her claim logically? Do you
think a one-sided test could be justified here? Explain.
Here, we are conducting test to see if the babies of low-income neighborhoods weigh less than
7.5 lbs. only, so one – sided test is sufficient. If, however, we were determining a difference in
weights, then a two-sided test would be necessary to determine both inequalities.
c) Run a one-sample t-test using the sample data above. What is your p-value from your results?
> babies = c(6,8.6,7.5, 8.2, 8, 8.1, 6.4, 6, 7.2, 4.8)
> t.test(babies, mu = 7.5)

One Sample t-test

data: babies
t = -1.079, df = 9, p-value = 0.3086
alternative hypothesis: true mean is not equal to 7.5
95 percent confidence interval:
6.199468 7.960532
sample estimates:
mean of x
7.08

We found a p-value for a two-sided t test. To get, p-value for a one-sided t test, we divide the
p-value listed above by 2. Thus, our p-value is 0.1543.

d) What is your conclusion to our hypotheses?


The p-value is 0.1543, which is greater than 0.01. Therefore, we failed to reject the
null hypothesis. The practical meaning is that there is not enough evidence to support
the claim that the average weight of babies from low-income neighborhoods is lower
than 7.5lbs from this data set.

4. One-Sample T-test: To complete this question, use the dataset Kinesiology_1.csv again. We will do a
one-sample t-test on the variable HT, assuming that the test is two-sided with α = 0.05. We are interested
in seeing if the mean height equals 170 cm or not.
a) Write the null and alternate hypotheses.
H0: μHT = 170 (mean height is equal to 170 cm)
HA: μHT ≠ 170 (mean height is not equal to 170 cm)

b) Run a one-sample t-test on the variable HT. What is your p-value from your results?
> Data_HT <- Data$HT
> t.test(Data_HT, mu = 170)

One Sample t-test

data: Data_HT
t = 6.0426, df = 59, p-value = 1.099e-07
alternative hypothesis: true mean is not equal to 170
95 percent confidence interval:
173.4112 176.7888
sample estimates:
mean of x
175.1
c) What is your conclusion to our hypotheses?
Since p-value is less than 0.05, we reject the null hypothesis. The mean grade of our sample
is significantly different from 170.

5.Conceptual questions: Complete the following concept questions from the book, in Chapter 4:
1, 8, 12, 13

1) True
8) True
12) False, there must be assumptions that are met when the t test is applied.
13) False, the degrees of freedom for the t test do depend on the sample size.

You might also like