tweak prop.test explanation #2
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I made a few tweaks to the explanation for
prop.test
. These include:It's possible that I mangled the results for a corner case or two, but I think before merging, since it's totally possible that I failed to test one or more combinations of arguments to
prop.test
and the new explanation now fails sometimes.Here's what the output looks like for a two-sample test that the proportions are equal.
This was a two-sample proportion test of the null hypothesis that the true population proportions are equal. Using a significance level of 0.05, we do not reject the null hypothesis, and cannot conclude that two population proportions are different from one another. The observed difference in proportions is 0.0833. The observed proportion for the first group is 0.5 (6 events out of a total sample size of 12). For the second group, the observed proportion is 0.583 (7, out of a total sample size of 12).
The confidence interval for the true difference in population proportions is (-0.564, 0.397). Intervals generated with this procedure will contain the true difference in population proportions 95 times out of 100.
The p-value for this test is 1. In other words: if the true difference in sample proportions were exactly 0, and we collected 100 replicate data sets, we would find a discrepancy this large (or larger) in about 100 of these 100 cases.