Hi there, I was looking for some help if possible.
So, I have a theory that some sharks eat blue fish. I checked 100 sharks. I found out that 30 ate blue fish. 70 did not.
What analysis can I run in RStudio to test this hypothesis and get a p-value (or the null, which I suppose is: no sharks eat blue fish)?
Initially I ran a chi-squared test and got a nice low p-value - 0.00001. But then I got confused... what if 50 sharks had eaten blue fish... now my p-value is 1. Is a chi square test inappropriate here? What can I do to test this simple hypothesis? I have yes/no data for the 100 sharks.
Thanks for your reply, the below is my R code. But i suspect i'm wrong trying a chi squared test. Would a one-sample proportion test be better? How might a perform a t test?
n_yes <- 31 # Replace with your actual count of shark that ate blue
n_no <- 72 # Replace with your actual count of shark that didn't eat blue
chisq.test checks whether the proportions are equal unless you tell it different. That's not what you want.
If the null is that no sharks eat bluefish and you observe a shark eating bluefish (which you do), then you can reject the null with absolute certainty without doing any statistics.
Yes i absolutely appreciate that! It would just be so nice to have a p number or some such to state they are doing so significantly, rather than just a percent or fraction.
thanks for the chi.test info, i am only appreciating that now. So, as I cant say what proportions i care about, a chi.test is not what i want to be using here at all then.