MyNixOS website logo
Description

Bayesian Inference for A|B and Bandit Marketing Tests.

Uses simple Bayesian conjugate prior update rules to calculate the win probability of each option, value remaining in the test, and percent lift over the baseline for various marketing objectives. References: Fink, Daniel (1997) "A Compendium of Conjugate Priors" <https://www.johndcook.com/CompendiumOfConjugatePriors.pdf>. Stucchio, Chris (2015) "Bayesian A/B Testing at VWO" <https://vwo.com/downloads/VWO_SmartStats_technical_whitepaper.pdf>.

grizbayr

CRAN status

A Bayesian Inference Package for A|B and Bandit Marketing Tests

Description:

Uses simple Bayesian conjugate prior update rules to calculate the following metrics for various marketing objectives:

  1. Win Probability of each option
  2. Value Remaining in the Test
  3. Percent Lift Over the Baseline

This allows a user to implement Bayesian Inference methods when analyzing the results of a split test or Bandit experiment.

Examples

See the intro vignette for examples to get started.

Marketing objectives supported:

  • Conversion Rate
  • Response Rate
  • Click Through Rate (CTR)
  • Revenue Per Session
  • Multi Revenue Per Session
  • Cost Per Activation (CPA)
  • Total Contribution Margin (CM)
  • CM Per Click
  • Cost Per Click (CPC)
  • Session Duration (seconds)
  • Page Views Per Session

Contributing

New Posterior Distributions

To add a new posterior distribution you must complete the following:

  1. Create a new function called sample_...(input_df, priors, n_samples). Use the internal helper functions update_gamma, update_beta, etc. included in this package or you can create a new one.

  2. This function (and the name) must be added to the switch statement in sample_from_posterior()

  3. A new row must be added to the internal data object distribution_column_mapping.

    • Select this object from the package
    • Add a new row with a 1 for every column that is required for this distribution (this is for data validation and clear alerting for the end user)
    • Save the updated tibble object using use_data(new_tibble, internal = TRUE, overwrite = TRUE) and it will be saved as sysdata.rda in the package for internal use.
    • Update the intro.Rmd markdown table to include which columns are required for your function.
  4. Create a PR for review.

New Features Ideas (TODO)

  • High Density Credible Intervals with each option
  • Conjugate Prior Update Rules vignette deriving each marketing objective update_rules

Package Name

The name is a play on Bayes with an added r (bayesr). The added griz (or Grizzly Bear) creates a unique name that is searchable due to too many similarly named packages.

Metadata

Version

1.3.5

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows