(12C) Binary Outcome
|
04-09-2018, 07:59 AM
(This post was last modified: 04-09-2018 09:42 PM by Dieter.)
Post: #5
|
|||
|
|||
RE: (12C) Binary Outcome
OK. I'll answer my own question. ;-)
(04-08-2018 07:39 AM)Dieter Wrote: Yes, that's the formula in the program. But where do you get the 16 from? For α = 0,05 I think it should be 2 · 1,96² = 7,68. And how do you factor in the β error? I guess I found something that explains what is going on. Take a look at this website. The formula given there is said to consider both α and β error. In the numerator it adds the z-values for both, i.e. z = zα+zβ. For α=0,05 and β=0,2 this leads to a constant of 2 · (1,96+0,84)² = 15,7 which almost agrees with the 16 given in the first post. But there is another difference in the formulas: the website calculates p1(1–p1) + p2(1–p2) while the formula in the above programs effectively evaluates p(1–p) + p(1–p) where p is the mean of p1 and p2. As long as p1 is not too different from p2 (or 1–p2) the results are comparable. In other cases they disagree. I guess (!) that the formula on the website is the (more) correct one, and so I think it should also be used in the program: Code: 01 STO 0 Note that the constant here is half that of the original program, i.e. 8 instead of 16. It doesn't make much of a difference, but for the exact solution replace the last three lines with... Code: 19 7 The constant is the square of Φ–1(1–0,05/2) + Φ–1(1–0,20) = 7,848879734349... So the returned sample size is valid for α=0,05 and β=0,20. Final Caveat: The Null hypothesis still is H0: p1=p2. So this does not (!) test whether one proportion is smaller or larger than the other, it just tests if they are different. This is an important detail as the initial post says: Quote:Suppose you want to test whether more people respond to one drug versus another, or whether one advertising campaign is more effective than another. Testing this would require a different constant based on zα of a single sided Normal CDF. Replace the constant with 6,183 if this is what you want to calculate. BTW, in cases like these I really love the WP34s and 31s for their convenient and accurate cdf and quantile functions. ;-) Dieter |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
(12C) Binary Outcome - Gamo - 04-07-2018, 08:49 AM
RE: (12C) Binary Outcome - Dieter - 04-07-2018, 06:10 PM
RE: (12C) Binary Outcome - Gamo - 04-08-2018, 02:58 AM
RE: (12C) Binary Outcome - Dieter - 04-08-2018, 07:39 AM
RE: (12C) Binary Outcome - Dieter - 04-09-2018 07:59 AM
RE: (12C) Binary Outcome - Gamo - 04-09-2018, 02:49 PM
RE: (12C) Binary Outcome - SlideRule - 04-09-2018, 03:51 PM
|
User(s) browsing this thread: 1 Guest(s)