Learn R Programming

exams.forge (version 1.0.10)

ddunif2: Sum of Two Independent Discrete Uniform Distributions

Description

Probability mass function, distribution function, quantile function and random generation for the sum of two independent discrete uniform distributions.

Usage

ddunif2(x, min = 1, max = 6)

pdunif2(q, min = 1, max = 6)

qdunif2(p, min = 1, max = 6)

rdunif2(n, min = 1, max = 6)

sum_discrete_unif_cdf(x, min = 1, max = 6)

sum_discrete_unif_pmf(q, min = 1, max = 6)

sum_discrete_unif_quantile(p, min = 1, max = 6)

sum_discrete_unif_rand(n, min = 1, max = 6)

Value

A numeric vector with the same length as x.

Arguments

x, q

numeric: vector of quantiles

min

numeric: lower limit of the distribution (default: 1)

max

numeric: upper limit of the distribution (default: 6)

p

numeric: vector of probabilities

n

numeric: number of observations. If length(n)>1, the length is taken to be the number required.

Examples

Run this code
ddunif2(1:13)
pdunif2(1:13)
qdunif2((0:4)/4)
rdunif2(10)

Run the code above in your browser using DataLab