learningRlab

There are three families of fuctions in LearningRlab:

  1. Main functions: these functions return the result of performing the process represented with the function.

  2. Explained fuctions: these funcions returns the process itself to get the result, with the result.

  3. User Interactive Functions: these functions maintain an interactive contact with the user to guide him in the resolution of the represented function.

Main Functions:

To explain the use of each function, we present a dataset to work with them:

data <- c(1,1,2,3,4,7,8,8,8,10,10,11,12,15,20,22,25)
plot(data); 

data2 <- c(1,1,4,5,5,5,7,8,10,10,10,11,20,22,22,24,25)
plot(data2);


#Binomial variables
n = 3
x = 2
p = 0.7
    
#Poisson variables
lam = 2
k = 3

#Normal variables
nor = 0.1

#T-Student variables
xt = 290 
ut = 310
st = 50
nt = 16

The arithmetic mean calculus function:

mean_(data)
#> [1] 9.823529

The geometric mean calculus function:

geometricMean_(data)
#> [1] 6.911414

The mode calculus function:

mode_(data)
#> Factor appears  3  times in the vector.
#> Unique mode
#> [1] 8

The median calculus function:

median_(data)
#> 
#> Sorted vector: 1 1 2 3 4 7 8 8 8 10 10 11 12 15 20 22 25
#> [1] 8

The standard deviation calculus function:

standardDeviation_(data)
#> [1] 6.989364

The average absolute deviation calculus function:

averageDeviation_(data)
#> [1] 5.460208

The variance calculus function:

variance_(data)
#> [1] 51.90441

The quartiles calculus function:

quartile_(data)
#> 
#> Sorted vector: 1 1 2 3 4 7 8 8 8 
#> 
#> 
#> Sorted vector: 1 1 2 3 4 7 8 8 8 10 10 11 12 15 20 22 25 
#> 
#> 
#> Sorted vector: 8 10 10 11 12 15 20 22 25
#> Q0 Q1 Q2 Q3 Q4 
#>  1  4  8 12 25

The percentile calculus function:

percentile_(data,0.3)
#> Percentile  30 % =  7

The absolute frecuency calculus function:

frecuency_abs(data,1)
#> [1] 2

The relative frecuency calculus function:

frecuency_relative(data,20)
#> [1] 0.05882353

The absolute acumulated frecuency calculus function:

frecuency_absolute_acum(data,1)
#> [1] 2

The relative acumulated frecuency calculus function:

frecuency_relative_acum(data,20)
#> [1] 0.8823529

The covariance calculus function:

covariance_(data, data2)
#> [1] 52.79585

The harmonic mean calculus funtion:

harmonicMean_(data)
#> 
#> Sorted vector: 1 1 2 3 4 7 8 8 8 10 10 11 12 15 20 22 25
#> [1] 4.069367

The pearson correlaction calculus funtion:

pearson_(data,data2)
#> [1] 0.9510292

The coefficient of variation calculus funtion:

cv_(data)
#> [1] 0.7114922

The Laplace rule calculus funtion:

laplace_(data,data2)
#> [1] 1

The binomial distribution calculus funtion:

binomial_(n,x,p)
#> [1] 0.441

The poisson distribution calculus funtion:

poisson_(k,lam)
#> [1] 0.180447

The normal distribution calculus funtion:

normal_(nor)
#> [1] 0.3969525

The tstudent distribution calculus funtion:

tstudent_(xt,ut,st,nt)
#> [1] -1.6

The chisquared distribution calculus funtion:

chisquared_(data,data2)
#> [1] 9.118615

The fisher distribution calculus funtion:

fisher_(data,data2)
#> [1] 0.03078098

##Explained Functions:

For each main function, there are an explained function to see the calculus process:

explain.mean(data)
#> 
#> __MEAN CALCULUS__ 
#> 
#> The mean of a dataset is calculated by the sum of the values divided by the number of values. We'll give the user an example for better comprension.
#> 
#> Formula -> (x1 + x2 +..+xn) / num_elements
#> xn: valor of elements to dataset
#> 
#> __Use Example__
#> 
#> First of all, we need to know the content of the dataset/vector of numbers
#> 
#> The content of the vector is: 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> Now we need to add each element of the vector/dataset
#> The sum of the elements is:  167 
#> 
#> Next step, get the number of elements that we've examined
#> The length of the vector is  17 elements
#> 
#> Formula applied ->  167 / 17  =  9.82352941176471
#> Now try by your own! :D
#> 
#> Use interactive.mean function to practice.
explain.geometricMean(data)
#> 
#> __GEOMETRIC MEAN CALCULUS__ 
#> 
#> The geometric mean of a dataset is calculated by multiplying each element of the dataset and raising the result to 1 divided by the number of elements in the dataset (the nth root). 
#>     We'll give the user an example for better comprension.
#> 
#> Formula -> (x1 * x2 *..* xn)^( 1 / num_elements)
#> xn: valor of elements to dataset
#> 
#> __Use Example__
#> 
#> First of all, we need to know the content of the dataset/vector of numbers
#> 
#> The content of the vector is: 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> Now we need to multiply each element of the vector/dataset
#> The product of the elements is:  1.87342848e+14 
#> 
#> Next step, get the number of elements that we've examined
#> The length of the vector is  17 elements
#> 
#> Formula applied -> ( 1.87342848e+14 ) ^ ( 1 / 17 ) =  6.91141369632174
#> Now try by your own! :D
#> 
#> Use interactive.geometricMean function to practice.
explain.mode(data)
#> 
#> __MODE CALCULUS__ 
#> 
#> The mode of a dataset is calculated by looking for the most repeated value in the dataset. If in a group there are two or several scores with the same frequency and that frequency is the maximum, the distribution is bimodal or multimodal, that is, it has several modes.
#> 
#> Formula -> Most repeated value of [Data]
#> 
#> __Use Example__
#> 
#> First step : search the most repeated value
#> 
#> The content of the vector is: 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> Factor  8  appears  3  times in the vector.
#> 
#> Second step : check the dataset looking for a value with the same maximum frequency
#> 
#> If there are only 1 unique most repeated value, it is the mode.
#> If there are 2 values repeated with the same maximum frequency each value represents the mode. Bimodal dataset
#> If there are more than 2 values repeated with the same maximum frequency, it is a Multimodal dataset
#> 
#> Now try by your own! :D
#> 
#> Use interactive.mode function to practice.
explain.median(data)
#> 
#> __MEDIAN CALCULUS__ 
#> 
#> The median of a dataset is the value in the middle of the sorted data. It's important to know that the data must be sorted. If the dataset has a pair number of elements, we should select both in the middle to add each other and get divided by two. If the dataset has a no pair number of elements, we should select the one in the middle.
#> 
#> Formula -> 1/2(n+1) where n -> vector size
#> 
#> __Use Example__
#> 
#> First step : identify if the vector has a pair number of elements
#> 
#> The content of the vector is: 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> 
#> Second step: depending of the number of elements
#> 
#> It has a ODD number of elements ( 17 )
#> 
#> We take the 'n/2' approaching up element
#> The result is :  8
#> Now try by your own! :D
#> 
#> Use interactive.median function to practice.
explain.standardDeviation(data)
#> 
#> __STANDARD DEVIATION CALCULUS__ 
#> 
#> The standard deviation of a dataset is calculated by adding the square of the diference between each element and the mean of the dataset. This sum will be dividing by the number of elements in the dataset and finally making the square root on the result. We'll give the user an example for better comprension.
#> 
#> Formula ->  square_root ((Summation(each_element - Mean)^2) / num_elements)
#> 
#> Mean -> (x1 + x2 +..+xn) / n
#> 
#> __Use Example__
#> 
#> First of all, we need to know the content of the dataset/vector of numbers
#> 
#> The content of the vector is: 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> The mean of dataset is... 9.82352941176471
#> The square of the diference between each number and the mean of dataset is: 77.85467 ,77.85467 ,61.20761 ,46.56055 ,33.91349 ,7.972318 ,3.32526 ,3.32526 ,3.32526 ,0.03114187 ,0.03114187 ,1.384083 ,4.737024 ,26.79585 ,103.5606 ,148.2664 ,230.3253
#> Now we need to add each element of the vector/dataset
#> The sum of the squares is:  830.470588235294 
#> 
#> Next step, get the number of elements that we've examined
#> The length of the vector is  17 elements
#> 
#> Formula applied -> ( 830.4706 / 17 ) ^ (1/2) =  6.98936413936664
#> Now try by your own! :D
#> 
#> Use interactive.standardDeviation function to practice.
explain.averageDeviation(data)
#> 
#> __AVERAGE DEVIATION CALCULUS__ 
#> 
#> The average deviation of a dataset is calculated by adding the absolute value of the diference between each element and the mean of the dataset. This sum will be dividing by the number of elements in the dataset. We'll give the user an example for better comprension.
#> 
#> Formula ->  (Summation(abs(each_element - mean))) / num_elements
#> 
#> Mean -> (x1 + x2 +..+xn) / num_elements
#> 
#> __Use Example__
#> 
#> First of all, we need to know the content of the dataset/vector of numbers
#> 
#> The content of the vector is: 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> The mean of dataset is... 9.82352941176471
#> The absolute value of the diference between each number and the mean of dataset is: 8.823529 ,8.823529 ,7.823529 ,6.823529 ,5.823529 ,2.823529 ,1.823529 ,1.823529 ,1.823529 ,0.1764706 ,0.1764706 ,1.176471 ,2.176471 ,5.176471 ,10.17647 ,12.17647 ,15.17647
#> Now we need to add each element of the vector/dataset
#> The sum of the squares is:  92.8235294117647 
#> 
#> Next step, get the number of elements that we've examined
#> The length of the vector is  17 elements
#> 
#> Formula applied ->  92.82353 / 17  =  5.46020761245675
#> Now try by your own! :D
#> 
#> Use interactive.averageDeviation function to practice.
explain.variance(data)
#> 
#> __VARIANCE CALCULUS__ 
#> 
#> The variance of a dataset is calculated by adding the square of the diference between each element and the mean of the dataset. This sum will be dividing by the number of elements in the dataset. We'll give the user an example for better comprension.
#> 
#> Formula ->  (Summation(each_element - Mean)^2) / num_elements
#> 
#> Mean -> (x1 + x2 +..+xn) / n
#> 
#> __Use Example__
#> 
#> First of all, we need to know the content of the dataset/vector of numbers
#> 
#> The content of the vector is: 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> The mean of dataset is... 9.82352941176471
#> The square of the diference between each number and the mean of dataset is: 77.85467 ,77.85467 ,61.20761 ,46.56055 ,33.91349 ,7.972318 ,3.32526 ,3.32526 ,3.32526 ,0.03114187 ,0.03114187 ,1.384083 ,4.737024 ,26.79585 ,103.5606 ,148.2664 ,230.3253
#> Now we need to add each element of the vector/dataset
#> The sum of the squares is:  830.470588235294 
#> 
#> Next step, get the number of elements that we've examined
#> The length of the vector is  17 elements
#> 
#> Formula applied ->  830.4706 / 16  =  51.9044117647059
#> Now try by your own! :D
#> 
#> Use interactive.variance function to practice.
explain.quartile(data)
#> 
#> __QUARTILES CALCULUS__ 
#> 
#> The quartile divides the dataset in 4 parts as equal as possible.
#> 
#> Formula -> First quartile (Q1) as the median of the first half of values. 
#>              Second quartile (Q2) as the median of the series itself.
#>              Third quartile (Q3) as the median of the second half of values. 
#> 
#> __Use Example__
#> 
#> Step 1: The vector must be sorted.
#> 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> 
#> Step 2: Calculated the quartiles 
#> 
#> Sorted vector: 1 1 2 3 4 7 8 8 8 
#> 
#> 
#> Q1 -> (median  1 1 2 3 4 7 8 8 8 )  =  4
#> Sorted vector: 1 1 2 3 4 7 8 8 8 10 10 11 12 15 20 22 25 
#> 
#> 
#> Q1 -> (median  1 1 2 3 4 7 8 8 8 10 10 11 12 15 20 22 25 )  =  8
#> Sorted vector: 8 10 10 11 12 15 20 22 25 
#> 
#> 
#> Q1 -> (median  8 10 10 11 12 15 20 22 25 )  =  12
#> 
#> Visualization with colors:
#> 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25 
#> 
#> Q1 ->  4 || Q2 ->  8 || Q3 ->  12 || Q4 -> onwards
#> Now try by your own! :D
#> 
#> Use interactive.quartile function to practice.
explain.percentile(data)
#> 
#> __PERCENTILES CALCULUS__ 
#> 
#> The percentile divides the dataset in 100 parts.
#> The percentile indicates, once the data is ordered from least to greatest, the value of the variable below which a given percentage is located on the data
#> 
#> Formula x -> (k * N ) / 100 where k -> [1-100] and N -> vector size
#> 
#> If rest of x is diference to 0, the value of its percentile will be the position of the quotient of the previous operation.  
#> 
#> In the opposite case and being 0 will be the sum of the elements whose value is the quotient and following, less in the case of the 100% percentile that will be the last element.  
#> 
#> __Use Example__
#> 
#> Step 1: The vector must be sorted.
#> 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> 
#> Step 2: Apply the formula (k * N) / 100 where 'k' is [1-100]
#> 
#> We will calculate the percentiles 1,25,37,50,92 in this example
#> 
#> Percentile 1 -> (1 *  17 ) / 100 =  0.17 
#>  .Round up the value to locate it in the vector ->  0.17  ~  1 
#>  ..In our data, the value is = 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> 
#> Percentile 25 -> (25 *  17 ) / 100 =  4.25 
#>  .Round up the value to locate it in the vector ->  4.25  ~  5 
#>  ..In our data, the value is = 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> 
#> Percentile 37 -> (37 *  17 ) / 100 =  6.29 
#>  .Round up the value to locate it in the vector ->  6.29  ~  7 
#>  ..In our data, the value is = 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> 
#> Percentile 50 -> (50 *  17 ) / 100 =  8.5 
#>  .Round up the value to locate it in the vector ->  8.5  ~  9 
#>  ..In our data, the value is = 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> 
#> Percentile 92 -> (92 *  17 ) / 100 =  15.64 
#>  .Round up the value to locate it in the vector ->  15.64  ~  16 
#>  ..In our data, the value is = 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> 
#> Now try by your own! :D
#> 
#> Use interactive.percentile function to practice.
explain.absolute_frecuency(data,10)
#> 
#> __ABSOLUTE FRECUENCY CALCULUS__ 
#> 
#> The absolute frequency (Ni) of a value Xi is the number of times the value is in the set (X1, X2, ..., XN)
#> 
#> Formula -> N1 + N2 + N3 + ... + Nk -> Nk = X (Where 'X' is the element we want to examine)
#> 
#> __Use Example__
#> 
#> All we need to do is count the number of times that the element  10  appears in our data set
#> 
#> Our data set: 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> 
#> Now count the number of times that the element  10  appears:  2 
#> 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> Now try by your own! :D
#> 
#> Use interactive.absolute_frecuency function to practice.
explain.relative_frecuency(data,8)
#> 
#> __RELATIVE FRECUENCY CALCULUS__ 
#> 
#> The relative frequency is the quotient between the absolute frequency of a certain value and the total number of data
#> 
#> Formula -> (Abs_frec(X) / N ) -> Where 'X' is the element we want to examine
#> 
#> __Use Example__
#> 
#> Step 1: count the number of times that the element  8  appears in our data set
#> 
#> Our data set: 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> 
#> Now count the number of times that the element  8  appears:  3 
#> 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> Step 2: divide it by the length of the data set
#> 
#> Solution --> relative_frecuency = (absolute_frecuency(x) / length(data)) =  3  /  17  =  0.176470588235294 .
#> 
#> Now try by your own! :D
#> 
#> Use interactive.relative_frecuency function to practice.
explain.absolute_acum_frecuency(data,10)
#> 
#> __ABSOLUTE ACUMULATED FRECUENCY CALCULUS__ 
#> 
#> The absolute acumulated frequency is the sum of the absolute frequency of the values minors or equals than the value we want to examine
#> 
#> Formula -> Summation(abs_frecuency <= X ) -> Where 'X' is the element we want to examine
#> 
#> __Use Example__
#> 
#> Step 1: count the number of times that the elements minors or equals than  10  appears in our data set
#> 
#> Our data set: 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> 
#> Number of times that elements minors or equals to  10  appears =  11 
#> 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> Solution --> absolute_frecuency_acum = Summation(abs_frecuency <= X)  =  11 .
#> 
#> Now try by your own! :D
#> 
#> Use interactive.absolute_acum_frecuency function to practice.
explain.relative_acum_frecuency(data,8)
#> 
#> __RELATIVE ACUMULATED FRECUENCY CALCULUS__ 
#> 
#> The relative acumulated frequency is the quotient between the sum of the absolute frequency of the values minors or equals than the value we want to examine, and the total number of data
#> 
#> Formula -> (Summation(abs_frecuency <= X) / N ) -> Where 'X' is the element we want to examine
#> 
#> __Use Example__
#> 
#> Step 1: count the number of times that the elements minors or equals than  8  appears in our data set
#> 
#> Our data set: 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> 
#> Number of times that elements minors or equals to  8  appears =  9 
#> 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> Step 2: divide it by the length of the data set
#> 
#> Solution --> relative_frecuency_acum = (Summation(abs_frecuency <= X) / length(data)) =  9  /  17  =  0.529411764705882 .
#> 
#> Now try by your own! :D
#> 
#> Use interactive.relative_acum_frecuency function to practice.
explain.covariance(data,data2)
#> 
#> __COVARIANCE CALCULUS__ 
#> 
#> The covariance of a dataset is calculated by product of sum of elements of x minus the mean's x and sum elements of y minus the mean's y. All of then divide by size of anyone dataset.
#> 
#> Formula ->  ((Summation(each_element(x) - Mean(x))) * Summation(each_element(y) - Mean(y))) / num_elements
#> 
#> Mean -> (x1 + x2 +..+xn) / n
#> 
#> __Use Example__
#> 
#> First of all, we need to know the contents of the datasets/vectors of numbers
#> 
#> The contents of the vectors are: 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,251 ,1 ,4 ,5 ,5 ,5 ,7 ,8 ,10 ,10 ,10 ,11 ,20 ,22 ,22 ,24 ,25
#> The mean of x dataset is... 9.82352941176471
#> The mean of y dataset is... 11.1764705882353
#> The difference of elements by their means: -8.823529 ,-8.823529 ,-7.823529 ,-6.823529 ,-5.823529 ,-2.823529 ,-1.823529 ,-1.823529 ,-1.823529 ,0.1764706 ,0.1764706 ,1.176471 ,2.176471 ,5.176471 ,10.17647 ,12.17647 ,15.17647 ,-10.17647 ,-10.17647 ,-7.176471 ,-6.176471 ,-6.176471 ,-6.176471 ,-4.176471 ,-3.176471 ,-1.176471 ,-1.176471 ,-1.176471 ,-0.1764706 ,8.823529 ,10.82353 ,10.82353 ,12.82353 ,13.82353 ,
#> Now we need to add each element of the vector/dataset
#> The sum of the elements of x is:  -4.61852778244065e-14 
#> The sum of the elements of y is:  4.61852778244065e-14 
#> 
#> Next step, get the number of elements that we've examined
#> The length of the vector is  17 elements
#> 
#> Formula applied -> ( -4.618528e-14 * 4.618528e-14 ) / 17  =  -1.25475287512801e-28
#> Now try by your own! :D
#> 
#> Use interactive.covariance function to practice.
explain.harmonicMean(data)
#> 
#> __HARMONIC MEAN CALCULUS__ 
#> 
#> The harmonic mean of a dataset is calculated by the number of values by divided the inverse sum of the values . We'll give the user an example for better comprension.
#> 
#> Formula -> num_elements/ (1/x1 + 1/x2 +..+ 1/xn) 
#> xn: valor of elements to dataset
#> 
#> __Use Example__
#> 
#> First of all, we need to know the content of the dataset/vector of numbers
#> 
#> The content of the vector is: 1 ,1 ,1 ,2 ,3 ,8 ,8 ,8 ,8 ,10 ,10 ,10 ,11 ,20 ,NA ,NA ,NA ,
#> The invert sum of the elements is:  4.17755411255411 
#> 
#> Next step, get the number of elements that we've examined
#> The length of the vector is  17 elements
#> 
#> Formula applied ->  17 / 4.17755411255411  =  4.06936679740729
#> Now try by your own! :D
#> 
#> Use interactive.harmonicMean function to practice.
explain.pearson(data,data2)
#> 
#> __PEARSON CORRELATION COEFFICIENT__ 
#> 
#> Pearson's correlation coefficient is the covariance of the two variables divided by the product of their standard deviations.It has a value between +1 and -1. A value of +1 is total positive linear correlation, 0 is no linear correlation, and -1 is total negative linear correlation.
#> 
#> Formula ->  (covariance(x,y) / (standardDeviation(x) * standardDeviation(y))
#> 
#> __Use Example__
#> 
#> First of all, we need to know the contents of the datasets/vectors of numbers
#> 
#> The contents of the vectors are: 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,251 ,1 ,4 ,5 ,5 ,5 ,7 ,8 ,10 ,10 ,10 ,11 ,20 ,22 ,22 ,24 ,25The value of covariance:  52.7958477508651 
#> The standard deviation of the elements of x is:  6.98936413936664 
#> The standard deviation of the elements of y is:  7.94270137864388 
#> 
#> Formula applied -> ( 52.79585 / ( 6.989364  *  7.942701 ) =  0.951029231000006
#> Now try by your own! :D
#> 
#> Use interactive.pearson function to practice.
explain.cv(data)
#> 
#> __COEFFICIENT OF VARIATION__ 
#> 
#> The coefficient of variation (CV) is defined as the ratio of the standard deviation to the mean.
#> 
#> Formula ->  (standardDeviation(x) / mean(x))
#> 
#> __Use Example__
#> 
#> First of all, we need to know the contents of the datasets/vectors of numbers
#> 
#> The contents of the vector is: 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25The standard deviation of the elements of x is:  6.98936413936664 
#> The value of mean:  9.82352941176471 
#> 
#> Formula applied -> ( 6.989364 /  9.823529  =  0.711492157899598
#> Now try by your own! :D
#> 
#> Use interactive.cv function to practice.
explain.laplace(data,data2)
#> 
#> __LAPLACE`S RULE __ 
#> 
#> Laplace's rule as the quotient between the number of favorable cases to A, and that of all possible results of the experiment.
#> 
#> Formula ->  (Cases favorable to A / All possible results)
#> 
#> __Use Example__
#> 
#> First of all, we need to know the contents of the datasets/vectors of numbers
#> 
#> The contents of the vector is: 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25Favorables cases:  17 
#> All possible results:  17 
#> 
#> Formula applied -> ( 17 /  17  =  1
#> Now try by your own! :D
#> 
#> Use interactive.laplace function to practice.
explain.binomial(n,x,p)
#> 
#> __BIONOMIAL DISTRIBUTION__ 
#> 
#> Binomial distribution with parameters n and p is the discrete probability distribution of the number of successes in a sequence of n independent experiments, each asking a yes or no question, and each with its 
#>         own Boolean-valued outcome: success (with probability p) or failure (with probability q = 1 - p)
#> 
#> Formula ->  ((factorial(n) / (factorial(x) * factorial(n-x))) * (p ^ x) * (1 - p)^(n - x))
#> 
#> __Use Example__
#> 
#> First of all, we need to know the n, the number of trials
#> In this case n= 3 
#> 
#> Second, we need to know the p, probability of success.
#> In this case p= 0.7 
#> 
#> Finally, we need to know the x, binomial random variable
#> In this case x= 2 
#> 
#> Formula applied -> (factorial( 3 ) / (factorial( 2 ) * factorial( 3 - 2 ))) * ( 0.7  ^  2 ) * (1 -  0.7 )^( 3  -  2 ) =  0.441
#> Now try by your own! :D
#> 
#> Use interactive.binomial function to practice.
explain.poisson(k,lam)
#> 
#> __POISSON DISTRIBUTION__ 
#> 
#> Poisson distribution that expresses the probability of a given number of events occurring in a fixed interval of time or space if these events occur with a known constant mean rate and independently of the time since the last event
#> 
#> Formula ->  ((e ^ (- lam)) * (lam ^ k)) / factorial(k)
#> 
#> __Use Example__
#> 
#> First of all, we need to know the e, the s Euler's number
#> In this case e= 2.718282  
#> 
#> Second, we need to know the lam, it is a positive parameter that represents the number of times the phenomenon is expected to occur during a given interval.
#> In this case lam= 2 
#> 
#> Finally, we need to know the k, the number of occurrences.
#> In this case k= 3 
#> 
#> Formula applied -> (( 2.718282   ^ (-  2 )) * ( 2  ^  3 )) / factorial( 3 ) =  0.180447044315484
#> Now try by your own! :D
#> 
#> Use interactive.poisson function to practice.
explain.normal(nor)
#> 
#> __NORMAL DISTRIBUTION__ 
#> 
#>  The standard normal distribution is one that has the mean value of zero, M = 0, and the standard deviation of unity, Sigma = 1.
#> Its density function is:
#> 
#> Formula ->  (1/(2pi)^(1/2)) * (e)^((-x^2)/2)
#> 
#> __Use Example__
#> 
#> First of all, we need to know the e, the s Euler's number
#> In this case e= 2.718282  
#> 
#> Finally, we need to know pi, the number pi.
#> In this case pi= 3.141593 
#> 
#> Formula applied -> (1/(2* 3.141593 )^(1/2)) * ( 2.718282 )^((- 0.1 ^2)/2) =  0.396952547477012
#> Now try by your own! :D
#> 
#> Use interactive.normal function to practice.
explain.tstudent(xt,ut,st,nt)
#> 
#> __T-STUDENT DISTRIBUTION__ 
#> 
#> T-student is a probability distribution that arises from the problem of estimating the mean of a normally distributed population when the sample size is small.
#> 
#> Formula ->  (x-u)/(s/(n)^(1/2))
#> __Use Example__
#> 
#> First of all, we need to know the x, is sample mean
#> In this case x= 290  
#> 
#> Second, we need to know the u, is population mean
#> In this case u= 310  
#> 
#> Next, we need to know the s, is population standard deviation
#> In this case s= 50  
#> 
#> Finally, we need to know the n, is sample size.
#> In this case n= 16 
#> 
#> Formula applied -> ( 290  -  310 )/( 50 /( 16 )^(1/2)) =  -1.6
#> Now try by your own! :D
#> 
#> Use interactive.tstudent function to practice.
explain.chisquared(data,data2)
#> 
#> __CALCUATED CHI-SQUARED DISTRIBUTION__ 
#> 
#> Calculated chi-squared is a probability distribution that serves to manifest tests in hypothesis of frequencies, this test compares observed frequencies with those expected frequencies.
#> 
#> Formula ->  ((x[1]-y[1])^2)/y[1] + ((x[2]-y[2])^2)/y[2] + ... + ((x[n]-y[n])^2)/y[n]
#> __Use Example__
#> 
#> First of all, we need to know the contents of the datasets/vectors of numbers
#> 
#> The contents of the vector x is: 
#> 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#> The contents of the vector y is: 
#> 1 ,1 ,4 ,5 ,5 ,5 ,7 ,8 ,10 ,10 ,10 ,11 ,20 ,22 ,22 ,24 ,25
#> 
#> Formula applied ->  0 +  0 +  1 +  0.8 +  0.2 +  0.8 +  0.142857142857143 +  0 +  0.4 +  0 +  0 +  0 +  3.2 +  2.22727272727273 +  0.181818181818182 +  0.166666666666667 +0 = 9.11861471861472
#> Now try by your own! :D
#> 
#> Use interactive.chisquared function to practice.
explain.fisher(data,data2)
#> 
#> __ F FISHER DISTRIBUTION__ 
#> 
#> F-Fisher distribution is a continuous probability distribution that arises frequently as the null distribution of a test statistic.
#> 
#> Formula -> sx2/sw2
#> 
#> sx2 <- 2 * (((mean_(x)-meant)^2) + ((mean_(y)-meant)^2))
#> (variance_(x) + variance_(y))/ 2
#> __Use Example__
#> 
#> First of all, we need two datasets.
#>  Dateset x: 
#> 1 ,1 ,2 ,3 ,4 ,7 ,8 ,8 ,8 ,10 ,10 ,11 ,12 ,15 ,20 ,22 ,25
#>  Dateset x: 
#> 1 ,1 ,4 ,5 ,5 ,5 ,7 ,8 ,10 ,10 ,10 ,11 ,20 ,22 ,22 ,24 ,25
#> Formula applied -> ( 1.83045 / 59.46691 ) =  0.030780980089099
#> Now try by your own! :D
#> 
#> Use interactive.fisher function to practice.

##User Interactive Functions:

These functions are designed for the user to practice with them, and they are the following: