i understand that the data in the file is unavailable, but can you explain to me
ID: 3369256 • Letter: I
Question
i understand that the data in the file is unavailable, but can you explain to me the steps that i would take in R?
tayla ETOd Download the file data.csv (comma separated text file) and read the data into R using the function read.csv). Your data set consists of 100 measurements in Celsius of body temperatures from women and men. Use the function t.test) to answer the following questions. Do not assume that the variances are equal. Denote the mean body temperature of females and males by up and HM respectively. (a) Find the p-value for the test Ho : 11F Hal versus HA : ?F ??. (b) Are the body temperatures for men and women significantly different? Use significance level ? 0.02. (c) Denote the sample mean of the females by p and the sample mean of the males by M. Then TF (d) The 98% two-sided confidence interval for the difference F-14M ranges from to CheckExplanation / Answer
read the data in R using the command data=read.csv(file="data.csv")
then attach the data using command attach(data)
Suppose the data on male body temperature is denoted by "a" and that on female body temperature by "b".Then to carry kut the t test you may check if the data is homoscedastic by using the command var.test(a,b). You will find the p value from the output and if you p-value is greater than 0.05 you can accept homoscedasticity of the data at 5% level of significance. Next carry out the t-test as required using the command t.test(a,b,var.equal=F, alternative=c("two.sided"))
on Running the code you will get your required p-value from the output
For the next part compare your P-value with 0.02 and accept(reject) Ho if p-value is greater (lesser) than 0.02
Next calculate the sample means of male and female body temperature by using the command mean(a) and mean(b) respectively.
On Running the command t.test() you will find the observed t value in the console output along with the degrees of freedom (df). using this df calculate the tabulated t value using the command qt(0.980,df). give it some name, for suppose t1. and give the tabulated t value a name "t". Then the 98% CI will be t-t1,t+t1
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.