Learn R Programming

CUB (version 0.1)

deltaprob: Mean difference of a discrete random variable

Description

Compute the Gini mean difference of a discrete random variable.

Usage

deltaprob(m, prob)

Arguments

m
Number of categories
prob
Probability distribution of the random variable

Examples

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

Run the code above in your browser using DataLab