Q1-无代写
时间:2023-10-13
2033 Summer Lab Test
Q1-Q5 based on “FloridaLakes.csv”
Q6-Q10 based on “Height.csv”
Load Data
df1 <- read.csv("FloridaLakes.csv")
pH <- df1$pH
AvgMer <- df1$AvgMercury
Q1
v1: Compute the correlation between pH and AvgMercury.
v2: Compute the R2 between pH and AvgMercury.
Q2
Fit a model that explores how pH level would affect the level of AvgMercury. Report the point estimate for
parameters in the model, and also the estimate for standard deviation σ.
Q3
v1: Test model relevance, clearly state hypothesis, value of the test statistics, p-value and conclusion. α = 0.05
v2: Test model relevance with ANOVA function. α = 0.05
Q4
v1: Prediction of AvgMercury with pH = 5, and its 95% prediction interval.
v2: Prediction of AvgMercury with pH = 7, and its 90% prediction interval.
Q5
v1: 90% confidence interval of σ2.
v1: 95% confidence interval of σ2.
1
In this question, notice that “Height” is the actual height of a person, whilst “IdealHt” is this person’s ideal
height in mind. Assume both following normal distribution.
Load Data
df2 <- read.csv("Height.csv")
x <- df2$Height
y <- df2$IdealHt
n <- length(x) # number of obs
Q6
Test if mean Height is less than mean IdealHt. Conclude results of the test from confidence interval.
Q7
Test if mean Height is less than mean IdealHt. Clearly state hypothesis, value of the test statistics, p-value
and conclusion.
Q8
Assume true distribution of Height-IdealHt follows N(−0.5, 2), estimate the power of the sign test. We test if
median Height is less than median IdealHt at a significance level of 0.05.
Q9
Use Wilcoxon test to test the NULL hypothesis that IdealHt < Height. Clearly state hypothesis, p-value and
conclusion. α = 0.05
Q10
Assume true distribution of Height-IdealHt follows N(−0.5, 2), estimate the power of the wilcoxon test. We
test the NULL hypothesis that IdealHt < Height at a significance level of 0.05.


essay、essay代写