Learn R Programming

grizbayr (version 1.3.5)

estimate_win_prob_vs_baseline_given_posterior: Estimate Win Probability vs. Baseline Given Posterior

Description

Calculates the win probability of the best option compared to a single other option given a posterior distribution.

Usage

estimate_win_prob_vs_baseline_given_posterior(
  posterior_samples,
  distribution,
  wrt_option
)

Value

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

Arguments

posterior_samples

Tibble returned from sample_from_posterior with 3 columns `option_name`, `samples`, and `sample_id`.

distribution

String: the distribution name

wrt_option

String: the option to compare against the best option.

Examples

Run this code
# Requires posterior_samples dataframe. See `sample_from_posterior()`
# for an example.
if (FALSE) {
estimate_win_prob_vs_baseline_given_posterior(
    posterior_samples = posterior_samples,
    distribution = "conversion_rate",
    wrt_option = "A")
}

Run the code above in your browser using DataLab