0% found this document useful (0 votes)
43 views6 pages

Statistics FOR Engineers: Assessment-1

This document contains statistics and calculations for a dataset on human heights. It provides the heights in centimeters grouped into bins, and the frequency of people in each bin. It then calculates various statistical measures for the dataset, including the mean, median, mode, variance, standard deviation, skewness, and kurtosis. Charts are generated to visualize the frequency distribution as a bar chart and pie chart.

Uploaded by

Harsha Vardhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views6 pages

Statistics FOR Engineers: Assessment-1

This document contains statistics and calculations for a dataset on human heights. It provides the heights in centimeters grouped into bins, and the frequency of people in each bin. It then calculates various statistical measures for the dataset, including the mean, median, mode, variance, standard deviation, skewness, and kurtosis. Charts are generated to visualize the frequency distribution as a bar chart and pie chart.

Uploaded by

Harsha Vardhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

ASSESSMENT-1

STATISTICS
FOR
ENGINEERS
MAT2001

NAME : HARSHA VARDHAN.D


REG.NO : 17BEC0774
SLOT : L23 + L24
SOLUTION :
> height = c("57.5 - 58.5","58.5 - 59.5","59.5 - 60.5","60.5 - 61.5","61.5 - 62.5","62.5 - 63.5","63.5 -
64.5","64.5 - 65.5")

> height

[1] "57.5 - 58.5" "58.5 - 59.5" "59.5 - 60.5" "60.5 - 61.5" "61.5 - 62.5"

[6] "62.5 - 63.5" "63.5 - 64.5" "64.5 - 65.5"

> xi = c(58,59,60,61,62,63,64,65)

> xi

[1] 58 59 60 61 62 63 64 65

> fi = c(10,18,30,42,35,28,16,8)

> fi

[1] 10 18 30 42 35 28 16 8

> cf = (10,28,58,100,135,163,179,187)

Error: unexpected ',' in "cf = (10,"

> cf = c(10,28,58,100,135,163,179,187)

> cf

[1] 10 28 58 100 135 163 179 187

> A = 61
>h=1

> d = (xi - A)/h

>d

[1] -3 -2 -1 0 1 2 3 4

> fd = sum(fi*d)

> fd

[1] 75

> fidi = fi*d

> fidi

[1] -30 -36 -30 0 35 56 48 32

> summary = data.frame(height,xi,fi,cf,d,fidi)

> summary

height xi fi cf d fidi

1 57.5 - 58.5 58 10 10 -3 -30

2 58.5 - 59.5 59 18 28 -2 -36

3 59.5 - 60.5 60 30 58 -1 -30

4 60.5 - 61.5 61 42 100 0 0

5 61.5 - 62.5 62 35 135 1 35

6 62.5 - 63.5 63 28 163 2 56

7 63.5 - 64.5 64 16 179 3 48

8 64.5 - 65.5 65 8 187 4 32

> mean = A + (sum(fi*d)/sum(fi))*h

> mean

[1] 61.40107

> N = sum(fi)

>N

[1] 187

> N/2

[1] 93.5

> L = 60.5

> cf0 = 58
> median = L + ((N/2 - cf0)/42)*h

> median

[1] 61.34524

> L2 = 42

> f = 42

> f0 = 30

> f1 = 35

> mode = L + ((f - f0)/(2*f-f1-f0))*h

> mode

[1] 61.13158

> variance = (sum(fi*xi^2)/N)-mean^2

> variance

[1] 3.106523

> sd = variance^1/2

> sd

[1] 1.553261

> u2 = (sum(fi-mean)^2)/N

> u2

[1] 494.8815

> u3 = (sum(fi-mean)^3)/N

> u3

[1] -150547.2

> skewness = (u3^2)/(u2^3)

> skewness

[1] 187

> u4 = (sum(fi-mean)^4)/N

> u4

[1] 45797745

> kurtosis = (u4)/(u2)^2

> kurtosis

[1] 187
> barplot(fi,xi,main = "People and Heights",xlab="Height",ylab="number of people")

> pie(fi,xi,main = "People and Heights")

BAR CHART:
PIE CHART:

You might also like