0% found this document useful (0 votes)
51 views2 pages

Code

The document generates random numbers between 1 and 100 for a dataset of 30 values. It then calculates the mean, median, standard deviation, variance, and coefficient of variation of the dataset.

Uploaded by

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

Code

The document generates random numbers between 1 and 100 for a dataset of 30 values. It then calculates the mean, median, standard deviation, variance, and coefficient of variation of the dataset.

Uploaded by

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

Code:

clc;
clear all;
close all;

A= randi(100,1,30) % dataset for 30 numbers


Mean=mean(A) % mean of data
Median = median(A) % median of data
Stanard_Deviation = std(A) % Stanard_Deviation
Variance = var(A) % Variance
CV=Stanard_Deviation/Mean % Coefficient of variation

Output:

A=

Columns 1 through 13

5 58 100 37 56 93 26 84 18 88 28 85 81

Columns 14 through 26

19 98 26 78 82 50 92 11 14 86 2 73 82

Columns 27 through 30

12 49 35 78

Mean =

54.866666666666667

Median =

57

Stanard_Deviation =

32.504358682080365
Variance =

1.056533333333333e+03

CV =

0.592424520329533

You might also like