Question

In: Math

*Please provide r studio file/code* Question: Test the equality of means of populations X,Y,Z using ANOVA:...

*Please provide r studio file/code*

Question:

Test the equality of means of populations X,Y,Z using ANOVA:
set.seed(88)
dta <- data.frame(v = c(2+2*rnorm(100),
3+3*rnorm(100),
4+4*rnorm(100)),
id = rep(c("x","y","z"),c(100,100,100)))

Solutions

Expert Solution

r code for Analysis of Variance

> set.seed(88)
> dta <- data.frame(v = c(2+2*rnorm(100),
+ 3+3*rnorm(100),
+ 4+4*rnorm(100)),
+ id = rep(c("x","y","z"),c(100,100,100)))
> head(dta)

v id
1 1.547489 x
2 3.293140 x
3 6.692117 x
4 -1.691237 x
5 2.919382 x
6 2.247562 x

> summary(dta)
v id   
Min. :-5.3698 x:100
1st Qu.: 0.7782 y:100
Median : 2.9051 z:100
Mean : 3.0497
3rd Qu.: 4.9302
Max. :15.5232


> aov(dta$v~dta$id,data = dta )
Call
:
aov(formula = dta$v ~ dta$id, data = dta)

Terms:
dta$id Residuals
Sum of Squares 195.3177 2675.4008
Deg. of Freedom 2 297

Residual standard error: 3.001347
Estimated effects may be unbalanced

> summary(aov(dta$v~dta$id,data = dta ))
Df Sum Sq Mean Sq F value Pr(>F)
dta$id 2 195.3 97.66 10.84 2.86e-05 ***
Residuals 297 2675.4 9.01   
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
>

Analysis of variance

Null hypothesis:

There is no significant difference between given three groups (x,y,z)

Alternative Hypothesis:

There is at least one group which is significantly different from other two.

T test statistic

F value is 10.84

p value :

2.85e-05

Decision:

P value is less thna level of significance (i.e 2.85e-05<0.05 ), Hence we reject the null hypothesis

Conclusion:

Since we reject the null hypothesis, and conclude that there is at least one group which is significantly different from other two groups.


Related Solutions

*Please provide r studio code/file* 1) Find the equation of the best fit line using least...
*Please provide r studio code/file* 1) Find the equation of the best fit line using least squares linear fit of x,y: set.seed(88) x <- 1:100 y <- jitter(1.5*x+8,amount=10) 2) For question 1, Draw the P=0.95 prediction intervals for y when x=1:150 3) For question 1, Find the equation of the best fit line using median-based linear fit of x,y. 4) For question 3, draw the P=0.95 prediction interval for y # when x=1:150
how do you test for regression in R studio with variables x and y
how do you test for regression in R studio with variables x and y
Answer IN R CODE please. Using the data below, Create a scatterplot of y vs x...
Answer IN R CODE please. Using the data below, Create a scatterplot of y vs x (show this) and fit it a simple linear regression model using y as the response and plot the regression line (with the data). Show this as well. Test whether x is a significant predictor and create a 95% CI around the slope coefficient. What does the coefficient of determinations represent? For x=20, create a CI for E(Y|X=20). Show this. For x=150, can you use...
Please explain this prolog code line by line. union([X|Y],Z,W) :- member(X,Z), union(Y,Z,W). union([X|Y],Z,[X|W]) :- \+ member(X,Z),...
Please explain this prolog code line by line. union([X|Y],Z,W) :- member(X,Z), union(Y,Z,W). union([X|Y],Z,[X|W]) :- \+ member(X,Z), union(Y,Z,W). union([],Z,Z).
Can You please Answer the question using R studio and R cloud Telomeres are complexes of...
Can You please Answer the question using R studio and R cloud Telomeres are complexes of DNA and protein that cap chromosomal ends. They consist of the same short DNA sequence TTAGGG repeated over and over again. They tend to shorted with cell divisions and with advancing cellular age, which will lead to chromosome instability or apoptosis (programmed cell death). Eukaryotic cells have the ability to reverse telomere shortening by expressing telomerase, an enzyme that extends the telomeres of chromosomes....
Question: Test the mean of population X for equality to zero (mu=0) using the sample x...
Question: Test the mean of population X for equality to zero (mu=0) using the sample x and t-test at a significance level 0.05 set.seed(88) x <- rt(150,df=2)
***This problem must be done using R so please provide the R code used to find...
***This problem must be done using R so please provide the R code used to find the solution. I have provided the data in data-wtLoss.txt below the question. I will also give "thumbs-up for correct R code" Thanks in advance.*** The file “data-wtLoss.txt” contains data on weight loss and self esteem evaluation at three time points over a period of three months for 34 individuals who are randomly selected from a residential area. These individuals are randomly assigned to one...
***This problem must be done using R so please provide the R code used to find...
***This problem must be done using R so please provide the R code used to find the solution. I have provided the data in data-wtLoss.txt below the question. I will also give "thumbs-up for correct R code" Thanks in advance.*** The file “data-wtLoss.txt” contains data on weight loss and self esteem evaluation at three time points over a period of three months for 34 individuals who are randomly selected from a residential area. These individuals are randomly assigned to one...
The Book of R (Question 20.2) Please answer using R code. Continue using the survey data...
The Book of R (Question 20.2) Please answer using R code. Continue using the survey data frame from the package MASS for the next few exercises. The survey data set has a variable named Exer , a factor with k = 3 levels describing the amount of physical exercise time each student gets: none, some, or frequent. Obtain a count of the number of students in each category and produce side-by-side boxplots of student height split by exercise. Assuming independence...
Solve following using Program R studio. Please show code and results. Thank you. 1. Assume that...
Solve following using Program R studio. Please show code and results. Thank you. 1. Assume that ? is a random variable follows binomial probability distribution with parameters 15 and 0.25.   a. Simulate 100 binomial pseudorandom numbers from the given distribution (using set.seed(200)) and assign them to vector called binran. b. Calculate ?(? < 8) using cumulative probability function. c. Calculate ?(? = 8) using probability distribution function. d. Calculate the average of simulated data and compare it with the corresponding...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT