Standard Normal Distribution Experiment: CSP-443 Lab Report by Vikash (UID: 17BCS1035), Essays (university) of Compiler Design

The practical experiment conducted by vikash (uid: 17bcs1035) in the modelling and simulation lab (csp-443) to test the standard normal distribution using matlab. The aim of the experiment, the code for implementing the experiment, and the resulting output and summary.

Typology: Essays (university)

2020/2021

Uploaded on 05/17/2021

ajay-singh-27
ajay-singh-27 🇮🇳

1 document

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Experiment-02
Student Name: Vikash UID: 17BCS1035
Branch: CSE Section/Group: CI-1/B
Semester: 7th Date of Performance: 08/12/2020
Subject Name: Modelling and Simulation lab Subject Code: CSP-443
1. Aim/Overview of the practical:
Write a program to implement Testing for Standard Normal Distribution.
2. Task to be done:
In this experiment we need to find the normal distribution with the help of mean , variance and standard
deviation .
3. Code for experiment/practical:
%x=mean+sqrt(var)*randn(r,c)
%for standard normal deviation mean is zero and variance is 1
n=10000;
norm_mean=1;
norm_var=2;
x=norm_mean+sqrt(norm_var)*randn(1,n);
% sqrt(norm_var) is standard deviation
nob=10;
a=min(x);
b=max(x);
aa=linspace(a,b,nob);% linspace is linearly spaced vector
count(size(aa))=0;
y(size(aa-1))=0;
for i=1:length(aa)-1
for j=1:length(x)
if x(j)>=aa(i) && x(j)<aa(i+1)
count(i)=count(i)+1;
end
end
y(i)=((aa(i)+aa(i+1))/2);
end
pf3
pf4

Partial preview of the text

Download Standard Normal Distribution Experiment: CSP-443 Lab Report by Vikash (UID: 17BCS1035) and more Essays (university) Compiler Design in PDF only on Docsity!

Experiment- Student Name: Vikash UID: 17BCS Branch: CSE Section/Group: CI-1/B Semester: 7th Date of Performance: 08/12/ Subject Name: Modelling and Simulation lab Subject Code: CSP-

1. Aim/Overview of the practical:

Write a program to implement Testing for Standard Normal Distribution.

2. Task to be done:

In this experiment we need to find the normal distribution with the help of mean , variance and standard deviation.

3. Code for experiment/practical:

%x=mean+sqrt(var)randn(r,c) %for standard normal deviation mean is zero and variance is 1 n=10000; norm_mean=1; norm_var=2; x=norm_mean+sqrt(norm_var)randn(1,n); % sqrt(norm_var) is standard deviation nob=10; a=min(x); b=max(x); aa=linspace(a,b,nob);% linspace is linearly spaced vector count(size(aa))=0; y(size(aa-1))=0; for i=1:length(aa)- for j=1:length(x) if x(j)>=aa(i) && x(j)<aa(i+1) count(i)=count(i)+1; end end y(i)=((aa(i)+aa(i+1))/2); end

%plotting o=y; p=count(1:end)\n; plot(o,p)

Summary: X=norm_mean+sqrt(norm_var)*randn(1,n); Norm_mean= variable for mean. Norm_var= variable for variance. R= row C= column. This formula is used to find the standard deviation. Learning outcomes (What I have learnt):

  1. The basic idea of applying formula in MATLAB.
  2. Different way of creating graph.