Question: data(ChickWeight) # Create T | F vector indicating observations with Diet == 3 index

data(ChickWeight)

# Create T | F vector indicating observations with Diet == "3"

index <- ChickWeight$Diet == "3"

# Create vector of "weight" for observations where Diet == "3" and Time == 20

pre <- subset(ChickWeight[index, ], Time == 20, select = weight)$weight

pre

# Create vector of "weight" for observations where Diet == "3" and Time == 21

post <- subset(ChickWeight[index, ], Time == 21, select = weight)$weight

post

# The pre and post values are paired, each pair corresponding to an individual chick.

cbind(pre, post)

Perform a one-sided, paired t-test on the Time == 20 and Time == 21 paired data.

provide t_stat," "p_value," "crit_t" and "lower_ci."

You are to 'manually' implement the test, rather than use t.test(), but you can use t.test() to confirm your work.

our "alternative" hypothesis is weight gain from day 20 to 21, that we are using paired data,

#and that our confidence interval will extend to positive infinity.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!