I am new to Chi-square tests. And after looking at some examples in my textbook, I wonder if test of independence and test of homogeneity are the same. This is an example in my textbook which use the test of independence:
"One hundred plants of the same species were randomly distributed in two lots of the same size, the two lots being then subjected to different treatments. At the end of a given period, the degree of attack of each of the plants was determined by a certain disease. Based on the information in the table below, should we consider that there are significant differences between the two treatments at the 5% threshold?"
My question is can we use the test of independence here? The question we are trying to answer is about the differences between two treatments. I do not see any relation between the difference and the independence. I think that the test we should use is test of homogeneity. So does it mean that we will get the same results when doing the test of independence and test of homogeneity? And in R, is the command for these two test the same?