How to compute the $p$ value? and the correct explanation of the overall experiment.(Is my answer correct?)

Hello community first of all thanks for helping me with my math problems. Here I'm again with hypothesis test exercise. I want to know if I made some mistake in my answer and if someone can help me to calculate the value $p$ for the problem, (I'm not sure how to do it). Thank you so much!

Problem statement:

Karl conducted an experiment to study whether honey bees have color vision. He trained bees to feed on a dish of sugar water that was set on a colored card. Later he set the colored card (without the sugar water) onto an array of four cards colored in grey. The experiment was repeated with the colored tile in different positions on the array. Of $27$ incoming bees who landed on a tile, twelve landed first on the colored tile.

• i) Define the population and sample involved in this experiment. Explain how this experiment can be used to test whether bees have color vision.
• ii) Define a parameter of interest and state a null hypothesis and alternative hypothesis involving this parameter. Hint: If bees could not see in color, what proportion of incoming bees would you expect to first land on the blue card? If you are using symbols, define what they represent.
• iii) Conduct a statistical hypothesis test to answer the question whether bees can see in color (at significance level $\alpha= 0.05$). Report the $p$-value of your test together with a conclusion sentence. Show your work.

My work:

i)

Because the bees are incentives with (I suppose $4$ dish with water) and the one with sugar was blue, then Karl must to change the position of the blue dish for making sure the bees don’t use their memory if they have it. After some time, he can take away the water and leave the blue card, with the others gray cards, knowing the proportion of the bees landed in the blue card, compared with the others gray cards. He can inferred that bees can distinguises blue over gray, because the only difference among the cards are the color, and no other sense is involve he can conclude bees are not color blind.

Population: All honeybees fed with the dish of sugar water that was set on the colored card varying the position.

Sample: $27$ incoming honeybees fed with the dish of sugar water that was set on the colored card, which landed on a tile.

ii)

Parameter of interest: proportion of bees that land first in the blue tail

$\mathbf{H_0:}$ The proportion of bees land first in a blue tail is equal to the proportion of bees landed first in other card. That means that bees are color blind (Extra: also it is possible they has no memory at all, that why he change position to discard such possibility)

$\mathbf{H_a:}$ If the proportion of bees that first landed in blue car is greater than the bees landed first in other card then bees aren’t color blind. It can differentiate blue color from others (at least one more color).

iii)

$P=12/27$ (bees land first in blue card) $Q=1-12/27$ (in other card in the example 3)

Sample size $=27$ Significance level $= 0.05$

Because is a small sample I use $t$ distribution. df $=27-1$ $\alpha=0.025/2$

Test statistic $= p \pm t\sqrt{pq/n}$

Questions:

Part i

It is correct my answer? If not what or where is my mistakes.

Part ii

It is correct my answer? If not what or where is my mistakes.

Part iii

1) How to compute the $p$ value, in this case? I need help in this part.

2) My answer for part iii. second question, if I know $p$, then if the $p$ value is smaller than the significance level of $0.05$ then I reject $H_0$ and I accept $H_a$, honey bees can see blue color.

• I would make numerous non-mathematical objections to any conclusions about bees drawn from such an experiment .For example, a color-blind animal may distinguish the red cards by differences in brightness, non-optical sensing of infra-red radiation, etc. – DanielWainfleet Feb 12 '16 at 5:52
• That is true, but I'm trying to make it simple and not overthink (you are right). It is a class of statistic, and the main issue is how to calculate the p value, which I have no idea yet, what approaches I need to use this bees ☹. – JulietaR Feb 12 '16 at 6:00

Edited slightly, per clarification in OP comment.

Under the null hypothesis that bees can distinguish red from various shades of grey, the probability of landing first on blue would be 1/4 (one blue card out of four cards altogether). So the null distribution of the number $X$ landing first on the blue card out of $N = 27$ (presumably independently acting) bees would be $X \sim Binom(N = 27, p = 1/4)$.

Under the null hypothesis, you would see on average $E(X) = Np = 27(1/4) = 6.75$ bees landing first on blue. You want to reject if $X$ is significantly greater than expected. The p-value (of this right-tailed test) for your particular data is defined as $P(X \ge 12)$ when $X \sim Binom(27, 1/4).$ You can use the binomial formula, binomial tables, or software to find this probability, or (approximately) by using a normal approximation. Using R software, I got the answer below:

 sum(dbinom(12:27, 27, 1/4))
## 0.02162228


So the p-value is $2.16\%,$ which is well below 5%, and you would say results are significant at the 5% level.

I suppose this gives you most of what you need, and will let you formulate the rest of the answers for yourself.

At the risk of 'overthinking' I would worry that some scent of sugar might have clung to the blue card from the first step of the experiment. Maybe I would use a different blue card from the same card stock as the first, and placed along with the grey cards by someone who has not been sneaking a taste of the sugar.

Also, your 'test statistic' looks more like an attempted confidence interval.

The figure below shows probabilities that sum to the p-value in red. The p-value can be roughly approximated by the area (1.74%) under the normal curve to the right of the dotted line.

Addendum: Code for figure (as requested in Comment):

 x = 0:27;  pdf = dbinom(x, 27, 1/4)
plot(x, pdf, type="h", lwd=2, main="PDF of BINOM(27,1.4)")
abline(h=0, col="green3")
curve(dnorm(x, 27/4, sqrt((27/4)*(3/4))), lwd=2, col="purple", add=T)
lines(12:27, pdf[13:28], type="h", lwd=3, col="red")
abline(v=11.5, col="purple", lty="dotted")

• Thanks for your answer. I did the test using the normal aproximation and the exact test with the binomial with R , and both are close to 2%. The only problem is there is only p=1/4, are only 4 cards (grays) and a blue card is put it above one of the grays. However, thanks. Extra: I was wondering why some books said np> or = 10 then aprox. works and others npq>or =5 is a pretty big difference. – JulietaR Feb 13 '16 at 4:42
• Rules for when to use the normal approximation can be only approximate. Also different authors have different levels of fussiness about how good an approx is good enough. Generally, you can't expect a normal approx to binomial to be much better than two place accuracy. Cases with nearly $p = 1/2$ often work best because then both the binomial and the approximating normal distributions are symmetrical. – BruceET Feb 13 '16 at 5:05
• Changed Answer from $p = 1/5$ to $p = 1/4$ to match your clarification. That change also gives a better normal approximation. – BruceET Feb 13 '16 at 8:17
• Thanks a lot! Last question, what comand did you use to print the pdf on R? – JulietaR Feb 14 '16 at 4:27
• Code edited into end of answer. – BruceET Feb 14 '16 at 7:01