Biostatistics with R/Descriptive Statistics

< Biostatistics with R

Summary For Formular with REdit

Formula

Number

Name Formula Formula with R
2.3.1 Class interval width using Sturges’s Rule w=\frac{R}{k} Example
2.4.1 Mean of a population \mu= {\sum_{i=1}^n{x_i} \over N}  Example
2.4.2 Skewness Skewness=\frac{\sqrt{n}\sum_{i=1}^n \left(x_i - \overline{x} \right)^3 }{(\sum_{i=1}^n \left(x_i - \overline{x} \right)^2)^\frac{3}{2}}=\frac{\sqrt{n}\sum_{i=1}^n \left(x_i - \overline{x} \right)^3 }{(n-1)\sqrt{n-1}s^3} Example
2.4.2 Mean of a sample \bar{x} = {\sum_{i=1}^n{x_i} \over N} Example
2.5.1 Range R=x_L-x_s Example
2.5.2 Sample variance s^2=\frac{1}{n-1} \sum_{i=1}^n \left(x_i - \overline{x} \right)^2  Example
2.5.3 Population variance \sigma^2=\frac{1}{N} \sum_{i=1}^N \left(x_i - \mu \right)^2  Example
2.5.4 Standard deviation s=\sqrt{s^2} = \sqrt{\frac{1}{n-1} \sum_{i=1}^n \left(x_i - \overline{x} \right)^2} Example
2.5.5 Coefficient of variation C.V.=\frac{s}{\bar{x}} Example
2.5.6 Quartile location in ordered array Q_1=\frac{1}{4}(n+1) Example
2.5.7 Interquartile range IQR=Q_3-Q_1 Example
2.5.8 Kurtosis Kurtosis=\frac{\sum_{i=1}^n \left(x_i - \overline{x} \right)^4}{(\sum_{i=1}^n \left(x_i - \overline{x} \right)^2)^2}-3 =\frac{n\sum_{i=1}^n \left(x_i - \overline{x} \right)^4}{(n-1)^2s^4} Example
Symbol Key
  • C.V.= coefficient of variation
  • IQR = Interquartile range
  • k = number of class intervals
  • m = population mean
  • N = population size
  • n = sample size
  • (n-1)=degrees of freedom
  • Q_1 = first quartile
  • Q_2= second quartile = median
  • Q_3= third quartile
  • R =range
  • s =standard deviation
  • s^2= sample variance
  • \sigma^2= population variance
  • x_i=i^th data observation
  • x_L= largest data point
  • x_S=smallest data point
  • \bar{x}= sample mean
  • w=class width
Example