Skip to contents

This function calculate the exact distribution of number of detections of a lineup assuming every subject selects exactly one plot.

Usage

exact_dist(n_eval, n_plot = 20, dist = "dirichlet", alpha = 1)

Arguments

n_eval

Integer. Number of evaluations.

n_plot

Integer. Number of plots in the lineup.

dist

Character. Name of the distribution used for the attractiveness model. One of "uniform" and "dirichlet".

alpha

Numeric. A single parameter value used by the Dirichlet distribution.

Value

A named vector representing the probability mass function of the distribution.

Details

For a given lineup, plots are assumed to have weights \(W_i, i = 1, ..., M,\) where \(M\) is the number of plots, and \(W_i\) follows a attractiveness distribution independently.

There are two attractiveness distribution available, one is uniform distribution, another is Dirichlet distribution. Uniform distribution ensures the marginal distribution of the probability of every plot being selected is uniform. When \(\alpha = 1\), Dirichlet distribution ensures the probability of every plot being selected is evenly distributed in a standard \(M - 1\) simplex.

Examples

sim_dist(c(2,2,3))
#>       0       1       2       3 
#> 0.69948 0.25282 0.04500 0.00270 
sim_dist(1)
#>      0      1 
#> 0.9503 0.0497