Publications by Todos Logos
Useful Links
Statistic on WikiPediaR homepageR download (first select the mirror)Blogs on R:Revolutions R BlogR bloggersPlanet RQuick-ROne R tip a dayData Mining With Rattle and RAniWikiR Graph GalleryR Tips / StatsRusRomain Francois blog“R” you ready?Learning RTaiyun Wei blogTom Moertel’s Weblog Related To leave a comment for the author, please follo...
683 sym 2 img
Let us practice with some functions of R
Given the following data set, compute the arithmetic mean, median, variance, standard deviation; find the greatest and the smaller value, the sum of all values, the square of the sum of all values, the sum of the square of all values; assigne the ranks and add them, assigning the ranks to the first 6 values and add those.10, 2, 19, 24...
1003 sym R (676 sym/1 pcs) 2 img
A probability exercise on the Bernoulli distribution
What is the probability, flipping a coin 8 times, to obtain the sequence HHTTTHTT? (H = head; T= tail)The theory teaches us that to solve this question, we can simply use the following formula:$$f(x)=P(X=x)=B(n,p)=\begin{pmatrix}n\\ x \end{pmatrix} \cdot p^x \cdot q^{n-x}=\frac{n!}{x!(n-x)!}$$To solve a problem like this, we can use i...
1252 sym R (29 sym/1 pcs) 2 img
Probability exercise: negative binomial distribution
What is the probability you get the 4th cross before the 3rd head, flipping a coin?The mathematical formula for solving this exercise, which follows a negative binomial distribution, is:$$f(x)=P(X=x)=\begin{pmatrix} x+y-1\\ y-1 \end{pmatrix} \cdot p^x \cdot (1-p)^y$$To solve a problem like this, the number of experiments is not signif...
1806 sym R (86 sym/2 pcs) 2 img
Geometric and harmonic means in R
Compute the geometric mean and harmonic mean in R of this sequence.10, 2, 19, 24, 6, 23, 47, 24, 54, 77These features are not present in the standard package of R, although they are easily available in some packets. However, it is easy to calculate these values simply by remembering the mathematical formulas, and applying them in R.$$...
1016 sym R (257 sym/2 pcs) 2 img
One sample Z-test
Comparison of the sample mean with know population mean and standard deviation.Suppose that 10 volunteers have done an intelligence test; here are the results obtained. The mean obtained at the same test, from the entire population is 75. You want to check if there is a statistically significant difference (with a significance level of 95%) betwe...
1645 sym R (177 sym/2 pcs) 2 img
Two sample Z-test
Comparison of the means of two independent groups of samples, taken from two populations with known variance.Is asked to compare the average heights of two groups. The first group (A) consists of individuals of Italian nationality (the variance of the Italian population is 5); the second group is taken from individuals of German nationality (the ...
1753 sym R (311 sym/2 pcs) 2 img
One sample Student’s t-test
Comparison of the sample mean with a known value, when the variance of the population is not known.Consider the exercise we have just seen before.It was made an intelligence test in 10 subjects, and here are the results obtained. The average result of the population whici received the same test, is equal to 75. You want to check if the sample mea...
2300 sym R (293 sym/2 pcs) 2 img
Two sample Student’s t-test #1
t-Test to compare the means of two groups under the assumption that both samples are random, independent, and come from normally distributed population with unknow but equal variancesHere I will use the same data just seen in a previous post. The data are given below:A: 175, 168, 168, 190, 156, 181, 182, 175, 174, 179B: 185, 169, 173, 173, 188, 1...
2555 sym R (745 sym/4 pcs) 2 img
Two sample Student’s t-test #2
Comparison of the averages of two independent groups, extracted from two populations at variance unknown; sample variances are not homogeneous.We want to compare the heights in inches of two groups of individuals. Here the measurements:A: 175, 168, 168, 190, 156, 181, 182, 175, 174, 179B: 120, 180, 125, 188, 130, 190, 110, 185, 112, 188As we have...
2865 sym R (773 sym/4 pcs) 2 img