1) An education researcher surveyed 1000 people about their age and number of years of schooling.
a. Would it be appropriate to use a test for homogeneity or independence? Briefly explain why.
b. Use the data in “education-by-age.csv” to test the hypothesis of no relationship between age and amount of schooling.
For question 1B could you just tell me the sequence of r code inputs I need to answer the question :)
a)Yes , You can use a test for homogeneity or independence because age and number of years of schooling are two independent attributes . For testing of two relation between two independent attributes , we always use chi-square test .
b) Construct Table of age and number of years of schooling.
Let , The freq. be a1,a2,a3,a4,b1,b2,b3,b4
a1,a2,a3,a4 are entries in first row
b1,b2,b3,b4 are entries in second row
i.e there are 2 rows & four column
Code for R-software
>x=c(a1,a2,a3,a4,b1,b2,b3,b4)
>m=matrix(x,byrow=2,ncol=4) { You have to write your no. of rows & no. of column }
>chis.test(m)
Get Answers For Free
Most questions answered within 1 hours.