In: Statistics and Probability
Solution-:
By using MS-Excel
we find frequency distribution and to draw histogram as below:
Class | Upper Limit | Freuqency |
0-9 | 9 | 1 |
10-199 | 19 | 14 |
20-29 | 29 | 17 |
30-39 | 39 | 7 |
40-49 | 49 | 3 |
50-59 | 59 | 2 |
60-69 | 69 | 2 |
70-79 | 79 | 1 |
80-89 | 89 | 2 |
90-99 | 99 | 1 |
This histogram shows skewed to the right.
By using R-Software:
>
x=c(67,84,80,77,97,59,62,37,33,42,36,54,18,12,19,33,49,24,25,22,24,29,9,21,21,24,31,17,15,21,13,19,19,22,22,30,41,22,18,20,26,33,14,14,16,22,26,10,16,24);x
[1] 67 84 80 77 97 59 62 37 33 42 36 54 18 12 19 33 49 24 25 22 24
29 9 21 21
[26] 24 31 17 15 21 13 19 19 22 22 30 41 22 18 20 26 33 14 14 16 22
26 10 16 24
> n=length(x);n
[1] 50
> #To find outliers for that purpose we find IQR
> Q1=quantile(x,0.25);Q1
25%
19
> Q3=quantile(x,0.75);Q3
75%
35.25
> IQR=Q3-Q1;IQR
75%
16.25
> # An outlier is defined as being any point of data that lies
over 1.5*IQR below the Q1 or above the Q3 in the dataset
> High=Q3+1.5*IQR;High
75%
59.625
> Low=Q1-1.5*IQR;Low
25%
-5.375
> #There are 6 outlires: 62,67,77,80,84,97
> #for finding Pearson Coefficient of Skewness
> mean=mean(x);mean
[1] 31.38
> tx=table(x);tx
x
9 10 12 13 14 15 16 17 18 19 20 21 22 24 25 26 29 30 31 33 36 37 41
42 49 54
1 1 1 1 2 1 2 1 2 3 1 3 5 4 1 2 1 1 1 3 1 1 1 1 1 1
59 62 67 77 80 84 97
1 1 1 1 1 1 1
> m=which(tx==max(tx))
> stx=sort(unique(x))
> Mode=stx[m];
> Mode
[1] 22
> n=50
> v=var(x);v
[1] 425.22
> var=((n-1)/n)*v;var
[1] 416.7156
> sd=sqrt(var);sd # Standard Deviation
[1] 20.41361
> Sk=(mean-Mode)/sd;Sk #Pearson Coefficient of Skewness
[1] 0.4594973
> #For Normality tset
> shapiro.test(x)
Shapiro-Wilk normality test
data: x
W = 0.80208, p-value = 9.796e-07
> #Conclusion:- If pvalue=9.796e-07< l.o.s.= \alpha=0.05
then We say that data is not normal.
R-Code:
x=c(67,84,80,77,97,59,62,37,33,42,36,54,18,12,19,33,49,24,25,22,24,29,9,21,21,24,31,17,15,21,13,19,19,22,22,30,41,22,18,20,26,33,14,14,16,22,26,10,16,24);x
n=length(x);n
#To find outliers for that purpose we find IQR
Q1=quantile(x,0.25);Q1
Q3=quantile(x,0.75);Q3
IQR=Q3-Q1;IQR
# An outlier is defined as being any point of data that lies over
1.5*IQR below the Q1 or above the Q3 in the dataset
High=Q3+1.5*IQR;High
Low=Q1-1.5*IQR;Low
#There are 6 outlires: 62,67,77,80,84,97
#for finding Pearson Coefficient of Skewness
mean=mean(x);mean
tx=table(x);tx
m=which(tx==max(tx))
stx=sort(unique(x))
Mode=stx[m];
Mode
n=50
v=var(x);v
var=((n-1)/n)*v;var
sd=sqrt(var);sd # Standard Deviation
Sk=(mean-Mode)/sd;Sk #Pearson Coefficient of Skewness
#For Normality tset
shapiro.test(x)
#Conclusion:- If pvalue=9.796e-07< l.o.s.= \alpha=0.05 then We
say that data is not normal.