• 2nd Floor, #7a, High School Road, Secretariat Colony Ambattur, Chennai-600053 (Landmark: SRM School) Tamil Nadu, India
• pro@slogix.in
• +91- 81240 01111

### How to measure the dispersion of the given data using R?

###### Description

To measure the dispersion of the given data in R programming.

#### Measures of dispersion

• Range or Variation
• Variance
• Standard deviation
• #### 1) Range or variation :

• Range is the difference between the smallest and highest value.
• R Function : range()

#### 2) Variance :

• Variance is the measure of how far is data vary from the average value.
• R Function : var()

#### 3) Standard Deviation :

• Standard deviation is the square root of the variance.
• R Function : sd()
###### Sapmle Code

#Measure of Dispersion

print(getwd())
setwd(“/home/sof#Measure of Dispersion

print(getwd())
setwd(“/home/soft13″)
print(getwd())
print(data)
print(is.data.frame(data))

#Range
range(data\$salary)

#Variance
var(data\$salary)

#Standard Deviation
sd(data\$salat13”)
print(getwd())