gen.simu.data: A Bootstrap Proportion Test for Brand Lift Testing (Liu et al., 2023)
Description
This function generates binomial random samples for the control group
(with sample size \(n_1\) and success probability \(p_1\)) and the treatment
group (with sample size \(n_2\) and success probability \(p_2\)).
Usage
gen.simu.data(n1, n2, p1, p2, summary=TRUE)
Value
A list of simulated data for the control group and the treatment group if summary=FALSE or
a 2x2 contingency table if summary=TRUE
Arguments
n1
sample size of the control group
n2
sample size of the treatment group
p1
success probability of the control group
p2
success probability of the treatment group
summary
boolean variable. if TRUE it returns 2x2 contingency table; if FALSE it returns raw binomial random samples.
By default, summary=TRUE.
Details
The a 2x2 contingency table is of the following form