This is an alias for sample_conv_rate with 2 different input columns. This function calculates posterior samples of \(CTR = clicks/impressions\). Adds 2 new nested columns to the input_df: `beta_params` and `samples`. `beta_params` in each row should be a tibble of length 2 (\(\alpha\) and \(\beta\) parameters) `samples` in each row should be a tibble of length `n_samples`
sample_ctr(input_df, priors, n_samples = 50000)
input_df with 2 new nested columns `beta_params` and `samples`
Dataframe containing option_name (str), sum_clicks (dbl), and sum_impressions (dbl).
Optional list of priors alpha0 and beta0. Default \(Beta(1,1)\) will be use otherwise.
Optional integer value. Defaults to 50,000 samples.
See update_rules vignette for a mathematical representation. $$click_i ~ Bernoulli(\phi)$$ $$\phi ~ Beta(\alpha, \beta)$$ Click Through Rate is sampled from a Beta distribution with a Binomial likelihood of an individual Clicking