Learn R Programming

grizbayr (version 1.3.5)

estimate_win_prob_vs_baseline: Estimate Win Probability vs. Baseline

Description

Calculates the win probability of the best option compared to a single other option given an input_df

Usage

estimate_win_prob_vs_baseline(
  input_df,
  distribution,
  priors = list(),
  wrt_option
)

Value

Tibble of each option_name and the win probability expressed as a percentage and a decimal `raw`

Arguments

input_df

Dataframe containing option_name (str) and various other columns depending on the distribution type. See vignette for more details.

distribution

String of the distribution name

priors

Optional list of priors. Defaults will be use otherwise.

wrt_option

string the option win prob is calculated with respect to (wrt). Required.

Examples

Run this code
input_df <- tibble::tibble(
    option_name = c("A", "B", "C"),
    sum_clicks = c(1000, 1000, 1000),
    sum_conversions = c(100, 120, 110)
)
estimate_win_prob_vs_baseline(input_df = input_df,
    distribution = "conversion_rate",
    wrt_option = "B")

Run the code above in your browser using DataLab