Description Usage Arguments Details Value Examples
View source: R/statistical-functions.R
Summarise an Empirical Probability Distribution Function.
1 | SummariseEmpiricalPDF(x, p)
|
x |
A vector of values of empirical PDF |
p |
A vector of probabilities |
Calculation of the mode is naive. For a multimodal distribution only the highest is returned, in the case of 2 or more modes with exactly the same probability, the first is returned.
Returns a named vector with the mean, median, mode, and standard deviation of the empirical PDF
1 2 3 | df <- data.frame(x = 1:10)
df$p <- dnorm(df$x, 5, 2)
SummariseEmpiricalPDF(df$x, df$p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.