ROOTR Notes
Basics on Statistical Analysis
Some notes on basic conceps and it tools in R and some examples on ROOTRDistribution/pdf | Example use in HEP |
Binomial | Branching ratio |
Multinomial | Histogram with fixed N |
Poisson | Number of events found |
Uniform | Monte Carlo method |
Exponential | Decay time |
Gaussian | Measurement error |
Chi-square | Goodness-of-fit |
Cauchy | Mass of resonance |
Landau | Ionization energy loss |
http://www.pp.rhul.ac.uk/~cowan/stat_cern.html
erf(Error Function) and erf.inv (Inverse Error Function)
http://mathworld.wolfram.com/InverseErf.html (For Gaussian Distribution)erf <- function(x) 2 * pnorm(x * sqrt(2)) - 1 erf.inv <- function(x) qnorm((x + 1)/2)/sqrt(2)
Example
erf.inv(1) erf.inv(0) erf.inv(-1) erf.inv(erf(.25)) erf(erf.inv(.25)) erf.inv(.5)
source link
KDE Kernel Density Estimation 1D
The way to get PDF ;DJust use de function density(x)
PDF (Probability Density Function)
http://reference.wolfram.com/mathematica/ref/SmoothKernelDistribution.htmlhttp://reference.wolfram.com/mathematica/ref/PDF.html
x <- log(rgamma(150,5)) PDF <- approxfun(density(x)) plot(density(x)) xnew <- c(0.45,1.84,2.3) points(xnew,df(xnew),col=2)
source link
Multivariate Analysis Approach
KDE Kernel Density Estimation
Exist a package called ks that lets you to calculate a KDE and KDAletting you to calculate an optimal h(bandwidth or smoothing) with full or diagonalized matrix.
paper at http://www.jstatsoft.org/v21/i07/paper
Autor: Omar Andres Zapata Mesa