Turning my earlier comment into an asnwer, as requested by @jbowman
- Assuming first that you are trying to test whether your observed counts X1 and X2 are compatible with the estimated proportions p1 and p2. I.e. your null is X1=p1 and X2=p2. Hence the alternate is that at least one of the X's is not equal to the hypothesized proportion estimate.
As per my earlier comment, you can not do that w/o knowing the N (equal for both samples 1 and 2) your counts came from.
A counterexample would be e.g.: p1 and p2 are estimated respectively at 75% and 25%. Your counts are X1=30 and X2=10.If you drew these counts from samples of size 40, then X1 and X2 are compatible with 75% and 25%. But if you drew them from samples of size, e.g. 400 (or 100, or ...), then the observed counts are NOT compatible with 75% and 25%.
So you need to know N.
A reason you need N is because you are trying here to compare apples to ornages. p1 and p2 are proportions, percentages: unitless numbers. But X1 and X2 are counts (e.g. number of "successes"); you can not compare a count to a percentage. YOu need N to turn X1 and X2 into percentages. Then you can compare them.
- Now let's assume you are instead trying to see if the ratio X1/X2 is compatible with the ratio p1/p2 (now they are both ratios, or proportions, unitless, therefore we may be able to compare).
To use exact binomial tests, you would need N.
To use normal approximations to the binomial, you would need the dof (hence N), and the variances, which also require N $(var=n*p*(1-p))$
You could use a bootstrap, by again you would need N (you kow how many 1's to put in the sample, but not how many 0's...)
So it would seem there is not a way?
Now, let's pretend that N=40: then indeed X1/X2 is totally compatible with p1/p2. This is indeed what we would expect. But, let's now pretend that N=400. Then X1/X2 is absolutely not compatible with p1=25% and p2=75%... Now, if all you know is the ratio p1/p2 (but that was not how you stated it), maybe we could check compatibility w/o knowing N. But if you know p1 and p2, you would need to also know N.
– jginestet Feb 28 '24 at 22:06