Repository navigation
Sample size: 2 × 2 designs, A/B tests and repeated trials - #47
Merged
Merged
Conversation
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Before: the sample size page had no 2 × 2 designs, so there was no plan for a before-and-after study with a control group. It never mentioned A/B tests, and it didn't say what to do when people do each condition several times.
After: a new design, "Two factors at once, like a 2 × 2 design", asks two things: whether each factor is between people, within people or one of each, and whether the question is about the interaction or a main effect. In plain words, an interaction is described by its shape: the effect disappears, halves or reverses. A/B tests are pointed to the two-group or yes/no design, and repeated trials are planned on each person's average.
How: every effect in a 2 × 2 design has 1 df, so its test is a t-test on one contrast, with λ = N·f² in every layout and df2 = N − 4, N − 2 or N − 1. The between-subjects case matches G*Power's "fixed effects, special" (128 people for f = .25). Mixed and within designs match 2000-run simulations in R. The page's R code is base R and is checked in CI like the other designs.