Showing posts with label Standard Deviation. Show all posts
Showing posts with label Standard Deviation. Show all posts

Friday, October 3, 2014

R Statistical Software Basics – Descriptive Statistics - Standard Deviation

The practice sheet titled StatisticMarks Data.csv downloaded from Link. – Download Sheet

About the Data Sheet - The data in this sheet is related to marks scored by 100 Students in a Statistical Test.

Based on the data, we will use R Software Statistical functions to analyze the descriptive statistics.

In the Data Sheet, we have Data from A2:A101, A1 being the header of the Data. I have stored the StatisticMarks.csv file in Working Directory on my Desktop.

setwd("C:/Users/Rajesh Prabhakar/Desktop/R")

For inputting or reading Data from “StatisticMarks.csv” file, R Command would be

StatMarks=read.csv("StatisticMarks.csv")

Standard Deviation
A measure of the dispersion of a set of data from its mean. The more spread apart the data, the higher the deviation. Standard deviation is calculated as the square root of variance.
In finance, standard deviation is applied to the annual rate of return of an investment to measure the investment's volatility.
In R Statistical Software, Standard Deviation is represented by function “sd”.

sd( )

In the Data Sheet, we have Data from A2:A101, A1 being the header of the Data titled StatisticsMarks. 

sd(StatMarks$StatisticsMarks)

StatMarks is the name of the variable in which we stored the data followed by $ sign and column header of the Data i.e. StatisticsMarks.

Remember the title of the column should be exactly same including the large caps & small caps or else it will give error.

In R the file names, column headers and row headers should exactly match the same or else the function will give errors

The result of this function in R Console is
sd(StatMarks$StatisticsMarks)
[1] 14.24


Sunday, September 14, 2014

STANDARD DEVIATION - Descriptive Statistics using Microsoft Excel Statistical Functions - Measure of Dispersion

The practice sheet can be downloaded from Link. Statistics Marks Data - Download Sheet

About the Data Sheet - The data in this sheet is related to marks scored by 100 Students in a Statistical Test. 

Based on the data, we will use Microsoft Excel Statistical functions to analyse the descriptive statistics. 

In the Data Sheet, we have Data from A2:A101, A1 being the header of the Data. 

STANDARD DEVIATION

Standard Deviation is measure of the dispersion of a set of data from its mean. The more spread apart the data, the higher the deviation. Standard deviation is calculated as the square root of variance.

Standard deviation is calculated based on a sample. The standard deviation is a measure of how widely values are dispersed from the average value (the mean).

= STDEV(number1,number2,...)

STDEV uses the following formula:

where x is the sample mean AVERAGE(number1,number2,…) and n is the sample size.
Or
=SQRT(Variance)

In the Data Sheet, we have Data from A2:A101, A1 being the header of the Data. 
=STDEV(A2:A101)
Result is 14.24
Or
=SQRT(Variance) or =SQRT(202.7777)

STDEV.P is for population
STDEV.S is for Sample


The practice sheet can be downloaded from Link. Statistics Marks Data - Download Sheet