Celebrate the Big Data Problems – #3

How to have our basic statistics (Mean, Median, SD, Var, Cor, Cov) computed using R language?

The dataottam team has come up with blog sharing initiative called “Celebrate the Big Data Problems”. In this series of blogs we will share our big data problems using CPS (Context, Problem, Solutions) Framework.

Context:

In statistics Mean, Median, Standard Deviations, Variance, Correlation, or Covariance are foundations steps. From Data Analyst to Data Scientist they will use the basic statistics. It can be arrived using many languages. But here we will use the language called R.

Mean – The mean is the average of the numbers. And it’s easy to calculate; add up all the numbers, then divide by how many numbers there are. In another words it is the sum divided by the count.

Median – The median is the middle of a sorted list of numbers. To find the median, place the numbers in value order and find the middle.

Standard Deviation – SD is a measure of how spreads out numbers are. And the symbol for SD is sigma, a greek letter.

Variance – The Variance is a measure of how spread out numbers are and it is the average of the squared difrences from mean.

Correlation- The Corereltion is when two sets of data are strongly linked together we say they have a high correlation. Correlation is positive when the values increase together, and it is negative when one value decreases as the other increases.

Covariance – covariance is a measure of how much two random variables change together.

Problem:

How to have our basic statistics Mean, Median, Standard Deviation, Variance, Correlation, and Covariance are computed using R language.

Solutions:

Use the below functions as applies with assumptions of x and y are vectors.

  • mean(x) median(x) sd(x) var(x) cor(x,y) cov(x,y)

Continue Reading …

Kumar Chinnakali

Kumar Chinnakali with a masters in Computer Applications, from SRM University Chennai, has spent more than 11+ years in IT and last five years in to the big data field. Love to take problems of data.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax