difference_dist: Find density of the difference of two distributions

Description Usage Arguments Details Value Examples

Description

Given two probability density functions dist1 and dist2, difference_dist returns the density of “dist1 - dist2'.

Usage

1
difference_dist(dist1, dist2)

Arguments

dist1, dist2

Probability density functions

Details

At the moment this only works when dist1 and dist2 are defined on [0, 1].

Value

A probability density function defined on [-1, 1].

Examples

1
2
3
4
d1 <- update_prior(30, 50, P = 0.5, prior = stats::dunif)
d2 <- update_prior(32, 40, P = 0.5, prior = stats::dunif)
dd <- difference_dist(d1, d2)
dist_hdr(dd, 0.95)

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