# compare_dists: Calculate probability that one posterior is larger than... In truelies: Bayesian Methods to Estimate the Proportion of Liars in Coin Flip Experiments

## Description

Given two distributions with density functions φ_1, φ_2, this calculates:

\int_0^1 \int_0^{l_1}φ_1(l_1) φ_2(l_2) d l_2 d l_1,

the probability that the value of the first distribution is greater.

## Usage

 1 compare_dists(dist1, dist2) 

## Arguments

 dist1 Density of distribution 1, as a one-argument function. dist2 Density of distribution 2.

## Value

A probability scalar.

## Examples

 1 2 3 d1 <- update_prior(30, 50, P = 0.5, prior = stats::dunif) d2 <- update_prior(25, 40, P = 0.5, prior = stats::dunif) compare_dists(d1, d2) 

truelies documentation built on Aug. 27, 2019, 1:02 a.m.