Goodness of Fit
Microhabitat factors associated with forage and bed sites of barking deer in Hainan Island, China, were examined. The sample of 477 examined sites where the deer forage were categorized by habitat as follows:
Habitat | Woods | Cultivated grassplots | Deciduous forests | Other |
Deer forage sites | 15 | 16 | 50 | 386 |
In this region, woods make up 4.8% of the land, cultivated
grassplots make up 14.7%, and deciduous forests make up
39.6%.
Do these data provide convincing evidence that barking deer prefer
to forage in certain habitats over others? Answer this research
question by conducting a goodness of fit test at 0.01 significance
level. Follow the steps outlined in the assignment
instructions.
Create a vector of assumed probabilities and use it to obtain and display a vector of expected values, then check that the assumptions required for this test are satisfied.
Find the P-value of the statistic using the appropriate chi-squared distribution.
Plot the distribution, a vertical line at the value of the test statistic, and show the P-value in the plot.
Verify that your statistic and P-value are correct by using the chisq.test instruction (if less than 10^ (-10),
consider both as zero).
(h) Do these data provide evidence that barking deer prefer to forage in certain habitats over others? Explain.
THIS MUST ALL BE COMPLETED AND DISPLAYED USING R STUDIO
observed <- c(12,22,66,392)
p
<- c(.048,.147,.396,1-(.048+.147+.396))
expected <- sum(observed) * p
expected
y
<- (expected -observed)^2/ expected
TS <- sum(y)
TS
p_val <- 1-pchisq(TS,3)
p_val
chisq.test(observed,p=p)
running code
observed <- c(12,22,66,392) > > p <- c(.048,.147,.396,1-(.048+.147+.396)) > expected <- sum(observed) * p > expected [1] 23.616 72.324 194.832 201.228 > y <- (expected -observed)^2/ expected > y [1] 5.713561 35.016108 85.189724 180.859304 > TS <- sum(y) > sum(TS) [1] 306.7787 > p_val <- 1-pchisq(TS,3) > p_val [1] 0
chisq.test(observed,p=p) Chi-squared test for given probabilities data: observed X-squared = 306.78, df = 3, p-value < 2.2e-16
c)
(Ei) = n * pi
d)
All Expected value should be greater than 5, hence the the assumptions required for this test are satisfied.
e)
\chi ^{2}=\sum \left [\frac{(O_{r,c}-E_{r,c})^{2}}{E_{r,c}} \right ]
X2 = 340.37
where DF is the degrees of freedom, k is the number of levels of the categorical variable, n is the number of observations in the sample, Ei is the expected frequency count for level i, Oi is the observed frequency count for level i, and X2 is the chi-square test statistic.
The P-value is the probability that a chi-square statistic having 3 degrees of freedom is more extreme than 340.37.
We use the Chi-Square Distribution Calculator to find P(X2 > 340.37) = less than 0.001.
Interpret results. Since the P-value (almost 0) is less than the significance level (0.05), we cannot accept the null hypothesis.
h) We have sufficient evidence in the favor of the claim that Barking deer prefer to forage in certain habitats over others.
Microhabitat factors associated with forage and bed sites of barking deer in Hainan Island
One would suspect that new home construction and sales depend on mortgage interest rates. If interest rates are high, fewer people will be able to afford to borrow the funds necessary to finance the purchase of a new home. Builders are aware of this fact, therefore when interest rates are high, they will be less inclined to build new homes. A question of interest is “If interest rates go up by 1% by how much does home construction fall?”. Data...
1) Rock-paper-scissors is a hand game played by two or more people where players choose to sign either rock',rock′,paper', or `scissors' with their hands. We would like to test if players choose between these three options randomly, or if certain options are favored above others. What hypothesis test should we conduct to answer this research question? Compare two means Compare two proportions Chi square test of goodness of fit Chi square test of independence 2) 6.43 Rock-paper-scissors: Rock-paper-scissors is a...
HELLO, PLEASE HELP WITH QUESTIONS 8-10 PLEASE PLEASE AND THANK YOU!! PLEASE, I DON'T HAVE ANY MORE QUESTIONS, AND I ASKED THIS 2 TIMES ALREADY AND NO RESPONSE. THANK YOU!!! APPRECIATE IT!! Question Completion Status: BUTTON Questions 5 to 11 are based on the following scenario Question 5: Although the following scenario is hypothetical, it is based on actual facts. African leopards live in a variety of habitats including forests, mountains, grasslands and deserts. Most leopards are light brown with...
The Forest In Your Mouth B Y E D Y O N G P U B L I S H E D J A N U A R Y 2 5 , 2 0 1 6 T H E S T U DY O F the human microbiome—the booming and much-hyped quest to understand the microbes that share our bodies—began in the mouth. Specifically, it began with dental plaque. In 1683, Antony van Leeuwenhoek, the first human ever to see...
1. A hypothetical investigation on rider satisfaction with a particular public transit system serving commuting residents of British California (BC) and Prince Edward’s County (PEC) offers some interesting findings. The proportion of commuters from BC that indicated low satisfaction with the transit system’s service in the 2018 calendar year was 65 percent, and the proportion from PEC was 70 percent. These point estimates were based on samples of 5,380 BC commuters and 6,810 PEC commuters, whose system-using commuters number in...