Learn R Programming

CUB (version 1.1.5)

deltaprob: Mean difference of a discrete random variable

Description

Compute the Gini mean difference of a discrete distribution

Usage

deltaprob(prob)

Value

Numeric value of the Gini mean difference of the input probability distribution, computed according to the de Finetti-Paciello formulation.

Arguments

prob

Vector of the probability distribution

Examples

Run this code
prob<-c(0.04,0.04,0.05,0.10,0.21,0.32,0.24)
deltaprob(prob)

Run the code above in your browser using DataLab