difference_dist {truelies}R Documentation

Find density of the difference of two distributions

Description

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

Usage

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


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)

[Package truelies version 0.2.0 Index]