P and S Manual - II Year Aids STD
P and S Manual - II Year Aids STD
NAME :
REGISTERNO :
ROLLNO :
Science YEAR : II
SEMESTER : III
Vision
To promote centre of excellence through effectual Teaching and Learning, imparting the
contemporaryknowledgecentriceducationthroughinnovativeresearchinmultidisciplinaryfields.
Mission
To impart quality technical skills through practicing, knowledge up dating in recent technology
CERTIFICATE
Submitted for the End Semester Practical Examination held on ........................ at VELTECH
MULTITECH Dr. RANGARAJAN Dr. SAKUNTHALA ENGINEERING COLLEGE, No.42,
AVADI–VELTECH ROAD, AVADI, CHENNAI-600062.
Signature of Examiners
Date:………………
DEPARTMENTOFARTIFICIALINTELLIGENCEANDDATASCIENCE
Train the graduates with the potential of strong knowledge in the respective
PEO1 field and to create innovative multi disciplinary solutions for challenges in
the society
Apply the core competency obtained in the field of Machine Learning for
PSO2 analysis, design and development of computing systems for multi-
disciplinary problems
Ethics: Apply ethical principles and commit to professional ethics and responsibilities and
PO8 norms of the engineering practice.
Individual and team work: Function effectively as an individual, and as a member or leader in
PO9 diverse teams, and in multidisciplinary settings.
Life-long learning: Recognize the need for, and have the preparation and ability to engage in
PO12 independent and life-long learning in the broadest context of technological change.
COURSE OBJECTIVES:
Provide the required mathematical support in real life problems and develop probabilistic models
which can be used in several areas of science and engineering.
The students will have a fundamental knowledge of Theoretical distributions concepts.
Understand the basic concepts of one and two dimensional random variable which are widely used in
IT fields.
Compute the test of hypothesis and apply in various engineering fields.
Apply the significance of advanced design of experimental in some important engineering
applications.
COURSE OUTCOMES:
Course
Outcomes CO Statements
CO1 Demonstrate and apply the basic probability axioms and concepts in their core areas.
Course
PSO1
PSO2
PSO3
PO10
PO11
PO12
PO1
PO2
PO3
PO4
PO5
PO6
PO7
PO8
PO9
Outcome
CO1 3 3 2 2 1 - - - - - - 1 1 - -
CO2 3 3 2 2 1 - - - - - - 1 1 - -
CO3 3 3 2 2 1 - - - - - - 1 1 - -
CO4 3 3 2 2 1 - - - - - - 1 1 - -
CO5 3 3 2 2 1 - - - - - - 1 1 - -
CO 3 3 2 2 1 - - - - - - 1 1 - -
Table of Contents
PROBABILITYANDSTATISTICS-LABINTEGRATED
AIM:
PROCEDURE:
PROGRAM:
error ('The number of activity hours and BMI values must be the same.');
end
correlation_coefficient=corr(activity_hours',bmi_values');%Transposetocolumn vectors
disp(['CorrelationCoefficient:',num2str(correlation_coefficient)]);
%Interpretation
if correlation_coefficient>0
else
end
OUTPUT:
RESULT:
lOMoARcPSD|27848569
9
EXNO:2 Perform the regression of x on y using MATLAB, where the
goal is to predict the values of x given y and visualize the
DATE: relationship with a best-fit line?
AIM:
To write a MATLAB code to perform the regression of x on y and predict the relationship.
PROCEDURE:
PROGRAM:
~= length(y)
end
lOMoARcPSD|27848569
10
% Step 3: Calculate coefficients for regression of x on y: x = my + b coefficients =
intercept = coefficients(2);
% Step 6: Plot the original data and the regression line figure;
plot(y,x_pred,'r-');%Regression line
xlabel('y');
ylabel('x');
hold off;
disp(['Intercept(b):',num2str(intercept)]);
lOMoARcPSD|27848569
11
OUTPUT:
RESULT:
lOMoARcPSD|27848569
12
EXNO:3 Write a code to calculate the correlation coefficient between
two sets of data using MATLAB, and what does the
correlation coefficient tell us about the relationship between
DATE: the data sets?
AIM:
PROCEDURE:
PROGRAM:
x = [12,14,22,29,33];
Y = [15,18,20,25,30];
r = corrcoef(x, y);
disp(r(1,2));
lOMoARcPSD|27848569
13
OUTPUT:
RESULT:
lOMoARcPSD|27848569
14
EXNO:4 Consider the following data representing the number of
study hours and the corresponding test scores of 6
students: Study_Hours = [2,4,6,8,10,12]
Test_Scores = [50,55,65,70,80,90]. Write a MATLAB program
DATE: to calculate the correlation coefficient and comment on
whether studying more hours’ results in better test scores.
AIM:
PROCEDURE:
PROGRAM:
Study_Hours=[2,4,6,8,10,12];
Test_Scores =[50,55,65,70,80,90];
% Step1: Check if the lengths of the two data sets are equal if
length(Study_Hours) ~= length(Test_Scores)
error('The number of study hours and test scores must be the same');
End
correlation_coefficient=corr(Study_Hours',Test_Scores');
15
disp(['Correlation Coefficient:',num2str(correlation_coefficient)]);
correlation_coefficient > 0
disp('There is a positive correlation, meaning studying more hours results in better test
scores.');
elseif correlation_coefficient<0
disp('There is a negative correlation, meaning studying more hours results in lower test
scores.');
else
end
OUTPUT:
RESULT:
lOMoARcPSD|27848569
16
AIM:
PROCEDURE:
PROGRAM:
if length(x) ~= length(y)
end
slope = coefficients(1);
intercept = coefficients(2);
lOMoARcPSD|27848569
17
% Step 5: Predict y-values based on the regression line
figure;
hold on;
xlabel('x');
ylabel('y');
hold off;
disp(['Intercept(b):',num2str(intercept)]);
OUTPUT:
RESULT:
lOMoARcPSD|27848569
18
EXNO:6
Write a MATLAB code for One-Way Classification ANOVA.
DATE:
AIM:
PROCEDURE:
PROGRAM:
%Sampledata
19
[p,tbl,stats]=anova1 (data,group_labels);
disp('P-value:');
disp (p);
multcompare (stats);
OUTPUT:
RESULT:
lOMoARcPSD|27848569
20
EXNO:7
Write a MATLAB code for Two-Way Classification ANOVA.
DATE:
AIM:
PROCEDURE:
PROGRAM:
data = [
];
21
[p,tbl, stats]=anova2(data,3);
disp('ANOVA Table:');
disp(tbl);
disp('P-values:');
disp(p);
OUTPUT:
RESULT:
lOMoARcPSD|27848569
22
EXNO:8
Write a MATLAB code for Three-way classification ANOVA
DATE:
AIM:
PROCEDURE:
PROGRAM:
23
28,36,30;29,38,35;32,39,34%Treatment2,Female
];
values = data(:);
treatment = repmat([1; 2], 6, 1);% Treatment levels gender =
repmat([1; 2], 3*2, 1);% Gender levels age_group =
repmat((1:3)', 4, 1);% Age group levels
OUTPUT:
RESULT:
lOMoARcPSD|27848569
24
AIM:
To write a MATLAB code to generate Latin square design for three experiments A,
B, C. Also to perform one way ANOVA.
PROCEDURE:
PROGRAM:
% Define treatments
latin_square =
[1, 2, 3;
2,3,1;
3,1,2];
disp(treatments(latin_square));
25
data = zeros(3,3);
for i = 1:3
forj=1:3
end
end
group_labels=reshape(latin_square',[],1);%Grouplabelsfortreatments
[p,tbl,stats]=anova1(reshaped_data,group_labels);
%Display p-value
disp(['p-value:',num2str(p)]);
if p < 0.05
26
OUTPUT:
RESULT: