Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Statistical test of significance - Please give R or SAS code. The left column is

ID: 3341253 • Letter: S

Question

Statistical test of significance - Please give R or SAS code.

The left column is the probability of contracting cancer, and the right column is the country, labeled countries 1-4. The right column is ordinal.

Do a test showing whether the probability differs amongst the four countries, or is the same. Thus, is there a difference in risk probability amongst countries, or is the probability about equal in all four countries. All possibly, test whether the variables are normal and homogenous.

Thank you

Risk Country 6.3 1 4.9 1 4.3 3 7.7 1 3.7 2 4.2 3 5.5 3 4.5 4 6.4 1 4.2 2

Explanation / Answer

Result:

Statistical test of significance - Please give R or SAS code.

The left column is the probability of contracting cancer, and the right column is the country, labeled countries 1-4. The right column is ordinal.

Do a test showing whether the probability differs amongst the four countries, or is the same. Thus, is there a difference in risk probability amongst countries, or is the probability about equal in all four countries. All possibly, test whether the variables are normal and homogenous.

Kruskal-Wallis Test used

R code:

grp <- c(1,1,3,1,2,3,3,4,1,2)

y <- c(6.3,4.9,4.3,7.7,3.7,4.2,5.5,4.5,6.4,4.2)

grp<-factor(grp)

mydata <- data.frame(grp,y)

kruskal.test(y ~ grp, data = mydata)

R output:

Kruskal-Wallis rank sum test

data: y by grp

Kruskal-Wallis chi-squared = 6.7637, df = 3, p-value = 0.07982

P value is > 0.05 level. We conclude that there is no difference in risk probability amongst the four countries.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote