This is probably a very basic question, but I just can't seem to find the answer elsewhere. If I want to calculate the probability of a certain number of events occurring (say 9 heads out of 20 coin tosses), I would use the binomial test.

However, which test should I use if my count is not an integer (I get 8.5 heads from 20 tosses, should that be possible)?


Thanks for the answer Tristan. I guess I was a little light on the details because I had hoped that there would be an easy answer. To expand a little, I am looking at situations where I have a series of events that can take one of two values, and my underlying expectation is that these events should occur equally as often, with the alternative test being that they don't. Given this, I obviously use a binomial test. As an example, I may see:

00001010001111010011: 11 zeros and 9 ones

This is just an observation, and what I am really trying to get at is the underlying state. However, the production of zeros and ones is biased, so what I have done is develop a method to correct for this bias. However, the method does not correct to whole numbers, so after correction it might be, say, 10.2 zeros and 9.8 ones. How do I test if this is significantly different from 50:50? I have toyed around with just rounding to the nearest integer, but using this approach I lose some of the information (since there often fairly small numbers involved, the fractions may actually be informative).

EDIT 2: 28th April

Sorry for letting this slide, I have been away. And thanks for the replies. To add more detail…

As stated, I am observing a series of zeros and ones at a given position. These are obtained as observations from a particular biological process, but I want to know what the actual underlying ratio is. So, as an example:

00000001111111 (Underlying Ratio) -> Process -> 00001111111 (Observation): Example 1

My method is to run an equal ratio of zeros and ones through this process and see if there is any bias (given that I know what is going into the process, I can view the output bias):

00000000001111111111 (My input) -> Process -> 000001111111111 (observation): Example 2

So from this example I can see that the process itself is creating a bias where 5 of the zeros are lost. Given this information, I can go back to the original observed data (Example 1), correct for the bias that I see in example 2, giving me an updated ratio (which I can then test to see if it varies from 50:50).

I hope this is enough information :o)

  • 2
    $\begingroup$ Count data is always integer. You're probably seeing data that involves Bernoulli trials plus some post-processing. $\endgroup$ – KishKash Apr 9 '15 at 19:59
  • $\begingroup$ I have edited my answer to indicate where I am currently in understanding your question. $\endgroup$ – tristan Apr 10 '15 at 5:40
  • 2
    $\begingroup$ If you're modifying the count you'd need to give enough information that some model of how the count is modified could reasonably be obtained; "correct for the bias" isn't enough to tell what is going on. It would also be useful to have some sense of what is producing the bias you're correcting for. $\endgroup$ – Glen_b Apr 10 '15 at 6:10
  • $\begingroup$ There still isn't enough information to answer your question. We are keen to help! $\endgroup$ – tristan Apr 10 '15 at 20:32

I'm not quite sure how you would end up with non-integer counts (I'll just assume it's quantum or something!)

A binomial distribution has no probability mass except at integer values 0, 1, ..., n, so even though the formula for Pr(X=x) can be coerced into working for non-integers (replace factorials in binomial coefficients by gamma functions) this is not correct to do.

You need to establish what the domain is for this random variable and then look at appropriate distributions on that basis. One option could be a scaled beta distribution, but it's too early at this point to tell.


Now you have given some more information I will have another stab at this.

I am imagining you have a situation where your underlying process is $X_i \sim Bernoulli(p)$ and you want to know whether $p=0.5$, but you cannot observe $X_i$ directly, but instead $Y_i$, which is a confusion of $X_i$ according to a known process, such that $\Pr(Y_i|X_i)$ is a 2x2 table, e.g.,

       0   1
Xi 0   0.7 0.3
   1   0.1 0.9

You then estimate, for example, if $Y_i$ takes value 1 twelve times and takes value 0 eight times that $X_i$ was in expectation 1 ten times and 0 ten times.

Except of course the numbers aren't always round like that.

Am I roughly on the right track? If so then the approach that would spring to mind is Bayesian MCMC where you explicitly describe the process and calculate a posterior distribution. Other approaches may also be suitable.

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.