Description Usage Arguments Value Examples

Compute power for Tests of Two Independent Proportions Takes phi, degrees of freedom, and a range of sample sizes. Alpha is .05 by default, alternative values may be entered by user This test uses what is sometimes called the chi-square test for comparing proportions

1 |

`p1` |
expected proportion Group 1 |

`p2` |
expected proportion Group 2 |

`nlow` |
starting sample size |

`nhigh` |
ending sample size |

`nratio` |
ratio of sample size of first group to second (default is .5 for equally sized groups) |

`alpha` |
Type I error (default is .05) |

`tails` |
number of tails for test (default is 2) |

`by` |
Incremental increase in sample (e.g. nlow = 10, nhigh = 24, by = 2, produces estimates of 10, 12, and 14) |

Power for Tests of Two Independent Proportions

1 |

```
n1 n2 Power
1 40 160 0.1239
2 60 240 0.1648
3 80 320 0.2054
4 100 400 0.2457
5 120 480 0.2855
6 140 560 0.3245
7 160 640 0.3627
8 180 720 0.3999
9 200 800 0.4359
10 220 880 0.4707
11 240 960 0.5041
12 260 1040 0.5362
13 280 1120 0.5668
14 300 1200 0.5960
15 320 1280 0.6237
16 340 1360 0.6500
17 360 1440 0.6748
18 380 1520 0.6982
19 400 1600 0.7203
20 420 1680 0.7410
21 440 1760 0.7605
22 460 1840 0.7787
23 480 1920 0.7958
24 500 2000 0.8117
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.