This function returns a data frame including data points and corresponding quantile.
new_quantile(data, sample)
A data frame contains the corresponding probability from cumulative distribution function (CDF), sample name, and corresponding respective quantiles.
A numeric vector of sampled data points.
A character string denotes which sample data points come from.
This is a function developed to get quantile for samples with only a few integer values. Define both \(p_{-1} = 0\) and \(q_{-1} = 0\). Replace the point mass at each integer \(z\) by a bar on the interval \([z – \frac{1}{2}, z+ \frac{1}{2}]\) with height \(P(X = z)\). This is a more "continuous" approximation of quantiles in this case.