Meaning of Power Analysis function parameters for SSizeLogisticBin when A/B test in R I did recently an A/B testing course in R from DataCamp and I could not understand the parameter B from the following function from the package powerMediation
SSizeLogisticBin(
  p1 = 0.58,    
  p2 = 0.88,    
  B = 0.5,     # Proportion from the data from the Test Condition (ideally 50%)
  alpha = 0.05,
  power = 0.8  
)

My questions are:


*

*It is the proportion of what? The amount of test data compared to
control? But isn't it what we want to know in a power analysis? how
could we know beforehand?

*Or, Is it the proportion between 0s and 1s from the test condition?
but it ends up being equal p2.


Any help is appreciated. Thank you in advance!
 A: In this package, if you check the code, it is the probability of X=1. I hope I got the terminology correct for A/B testing, it means the probability of someone clicking / choosing. Most of the time you assume it to be 0.5, but in some situations or cases other than A/B testing, this probability might be different. 
Side note: If you check the citation behind this package, it's actually for something else.. 
A: From the documentation, B is the Pr(x=1), which is confusing if it is read in terms of a conversion rate rather than a binary covariate in a logistic regression model. It took a minute to click for me as well. If you are running an A/B test, x=1 if the customer is exposed to the treatment and x=0 if the customer is exposed to the baseline. Consider the following model,
$y_i \sim Binomial(n,p_i) \\
logit(p_i) = \alpha + \beta x_i$
If you set B=0.5, you are simply stating that the customer is exposed to the treatment at the same frequency as the baseline, so $x_i=1$ half the time. If you set B=0.25, then $x_i=1$ 1/4 of the time.
library(powerMediation)

# B = 0.5 
n <- SSizeLogisticBin(
  p1 = 0.58,    
  p2 = 0.88,    
  B = 0.5,     
  alpha = 0.05,
  power = 0.8  
) 

n_treatment <- n_baseline <- n

# B = 0.25
n <- SSizeLogisticBin(
  p1 = 0.58,    
  p2 = 0.88,    
  B = 0.25,     
  alpha = 0.05,
  power = 0.8  
)

n_treatment <- n
n_baseline <- n/0.25

