Categories
R Statistic

Relation between median and mean using R

We are going to work mainly with R. R is a free software environment for statistical computing and graphics. When the data have a symmetrical distribution without outliers, the mean and the sample median are very close.  consume<-c(6.9, 6.3, 6.2, 6.5 ,6.4, 6.8, 6.6)data.frame(mean=mean(consume),median=median(consume))  > data.frame(mean=mean(consume),median=median(consume)) mean median1 6.528571 6.5 However, when the distributions are asymmetrical the measure and the […]

Categories
R Statistic

Binomial distribution in R

We have one experiment with two possible results (success and fail) where the probability of success is Π. In probability theory and statistics, the binomial distribution with parameters n and p is the discrete probability distribution of the number of successes in a sequence of n independent experiments. If we repeat n independent trials in the same conditions the variable… x = number of success in n trails follow a binomial […]