New Math-Lab-report
New Math-Lab-report
Bhadrapur, Jhapa
This certificate is to certify that the Lab Report entitled “Probability & Statistics”
is an academic work done by Manjil Timsina submitted in the partial fulfillment
of the requirements for the degree of Bachelor of Computer Application (BCA)
at faculty of Humanities and Social Science, Tribhuvan University under my
guidance and supervision. To the best of my knowledge, the worked performed
by him in the lab report is his own creation.
Name :
Designation :
Date :
..………………………
Signature of Supervisor
Table of Contents
Introduction: ............................................................................................................................. 1
Formula: ................................................................................................................................... 2
Steps to be followed in SPSS: ................................................................................................... 3
For Mean, Median, Mode, Percentile, SD, Variance, Range: .......................................................3
For Regression ...................................................................................................................................3
For Correlation: ................................................................................................................................3
For Binomial Distribution ................................................................................................................3
For Poisson Distribution ...................................................................................................................4
For One way ANOVA table: ............................................................................................................4
For Two way ANOVA table: ............................................................................................................4
Lab 1: ......................................................................................................................................... 5
Lab 2: ......................................................................................................................................... 6
Lab 3: ......................................................................................................................................... 7
Lab 4: ......................................................................................................................................... 8
Lab 5: ......................................................................................................................................... 9
Lab 6: ....................................................................................................................................... 10
Lab 7: ....................................................................................................................................... 11
Lab 8: ....................................................................................................................................... 12
Lab 9: ....................................................................................................................................... 13
Lab 10: ..................................................................................................................................... 14
Lab 11: ..................................................................................................................................... 15
Lab 13: ..................................................................................................................................... 17
Lab 14: ..................................................................................................................................... 18
Lab 15: ..................................................................................................................................... 19
Introduction:
SPSS, which stands for "Statistical Package for the Social Sciences," is a powerful software
program used for statistical analysis and data management. It is widely employed in various
fields, including social sciences, psychology, business, and healthcare, to analyze data and
make informed decisions based on research findings. Here's an introduction to SPSS and its
five main features:
1. Data Management: SPSS provides robust tools for data entry, manipulation, and
management. You can easily input data, import data from various file formats, clean and
transform data, and handle missing values. This feature streamlines the data preparation
process, ensuring your data is ready for analysis.
2. Statistical Analysis: SPSS offers a wide range of statistical techniques to explore and
analyze data. These include descriptive statistics (mean, median, mode), inferential
statistics (t-tests, ANOVA, regression), non-parametric tests, factor analysis, and more. It
allows you to perform both basic and advanced statistical analyses to uncover patterns,
relationships, and insights within your data.
3. Data Visualization: Visualization is a crucial aspect of data analysis, and SPSS offers
various tools to create meaningful graphs and charts. You can create bar charts, histograms,
scatterplots, and more to visually represent your data. Effective visualization helps you
communicate your findings and make data-driven decisions.
4. Reporting and Output: SPSS generates comprehensive and customizable output reports that
include tables, charts, and statistical summaries. These reports can be exported to various
formats, such as PDF, Word, Excel, or HTML, making it easy to share your results with
colleagues or stakeholders. SPSS also supports syntax, allowing you to automate and
reproduce analyses.
5. Data Mining and Predictive Analytics: SPSS includes advanced features for data mining
and predictive analytics. You can use techniques like decision trees, clustering, and logistic
regression to identify patterns and make predictions based on historical data. This is
particularly valuable in fields like marketing, where predictive modeling can inform future
strategies.
In addition to these five main features, SPSS offers a user-friendly interface that makes it
accessible to individuals with varying levels of statistical expertise. It's a versatile tool that
supports both basic data analysis tasks and complex research projects, making it a popular
choice for researchers and data analysts across different industries.
1
Formula:
a) Mean= Sx/n
b) Media= (n+1)/2
c) First quartile= (n+1)/4
d) Second quartile= 2(n+1)/4
e) Third quartile= 3(n+1)/4
f) 25th percentile= 25(n+1)/100
g) 50th percentile= 50(n+1)/100
h) 75th percentile= 75(n+1)/100
i) Range= Largest - Smallest(L-S)
j) Coefficient of Range= (L-S)/(L+S)
k) Interquartile Range= Q3-Q1
l) Quartile deviation= (Q3-Q1)/2
m) Cofficient of quartile deviation= (Q3-Q1)/(Q3+Q1)
n) Standard Deviation= √ [Σx^2/n-(Σx/n)^2]
o) Varience= σ^2
p) Cofficient of Varience= (σ / x̄)*100%
2
Steps to be followed in SPSS:
For Regression
i. Enter value of the variable X and Y.
ii. Select Aralyze è Regression è Linear.
iii. Move X into Independs (s) and Y into Depends (s). then click OK.
For Correlation:
i. Enter value of the variables X and Y.
ii. Select Aralyze è Correlate è Bivariate
iii. Move X and Y into Variable(s). Select Pearson. Then, click OK.
3
For Poisson Distribution
i. Click Analyze > Generalized Linear Models > Generalized Linear
Models... on the main menu.
ii. Select Poisson loglinear in the Counts area.
iii. Select the Response tab.
iv. Transfer dependent variable using the button.
v. Select Predictors tab.
vi. Transfer the categorical independent variable into the Factors: box and the
continuous independent variable into Covariates: using the button.
vii. Select the Model tab.
viii. Keep the default of “Main effects” in the -build Term(s)- area and transfer the
categorical and continuous independent variables from the “Factors and
Covariates:” box into the “model:” box using the button.
ix. Select the “Estimation” tab.
x. Keep the default option selected.
xi. Select the “Statistics” tab.
xii. Select “Include exponential parameter estimates” in the “Print” area.
xiii. Click “OK” button. This will generate the output.
4
Lab 1:
Find mean, median, mode, p25, p50, p75 from the following data:
Data: 10 20 30 40 50 60 70 80 90 30 25 31
Solution:
SPSS SYNTAX:
FREQUENCIES VARIABLES=x
/NTILES=4
STATISTICS=STDDEV VARIANCE RANGE MINIMUM MAXIMUM MEAN
MEDIAN
/ORDER=ANALYSIS.
From the above table, we found that Mean = 44.6667, Median = 35.5000, Mode = 30,
p25 = 26.2500, p50 = 35.5000, p75 = 67.5000.
5
Lab 2:
Find mean, median, mode, p25, p50, p75 from the following data:
Data: 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50, 50, 50, 50,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 60, 60, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80
SPSS SYNTAX:
FREQUENCIES VARIABLES=x
/NTILES=4
STATISTICS=STDDEV VARIANCE RANGE MINIMUM MAXIMUM MEAN
MEDIAN
/ORDER=ANALYSIS.
From the above table, we found that Mean = 45.8861, Median = 49.0000, Mode = 50.00,
p25 = 29.0000, p50 = 49.0000, p75 = 61.0000.
6
Lab 3:
12 10 26 6 10 19 23 17 13.9 3 30 16 9 6 11 10 8.4
9.5 9 11.8 8 7 20 24 21 10.7 4 12 12 12 9 8.3 9 4.7
From the above table, we found that Karl Pearsons correlation coefficient is .614**.
7
Lab 4:
Correlations
Blood
Age
Pressure
Pearson
Age 1 .892**
Correlation
Sig. (2-tailed) 0.001
N 10 10
Pearson
Blood Pressure .892** 1
Correlation
Sig. (2-tailed) 0.001
N 10 10
**. Correlation
is significant at
the 0.01 level
(2-tailed).
From the above table, we found that the correlations Coefficients is .892**.
8
Lab 5:
From the above table, we found that Mean = 525.00, Median = 525.00, p25 = 512.50,
p50 = 525.00, p75 = 537.50.
9
Lab 6:
f 0 1 2 3 4 5 6 7
x 71 112 117 57 27 11 3 1
x 0 1 2 3 4 5 6 7
f 71 112 117 57 27 11 3 1
Expected Frequency 68 120 106 63 28 10 3 1
10
Lab 7:
Fit the binominal distribution to the data given below
f 0 1 2 3 4
x 28 62 46 10 4
11
Lab 8:
12
Lab 9:
Fit the Poisson distribution and find expected frequency.
MPP NOP
0 142
1 156
2 69
3 27
4 5
5 1
13
Lab 10:
The yield of treatments in different plots are as shown in the following plots. Carry out
analysis and create ANOVA table.
t1 2537 2069 1797 2104
t2 2211 3366 2591 2544
t3 2536 2459 2827 2385 2460
t4 1401 1170 1516 2104 1077
14
Lab 11:
Create ANOVA table:
A B C
10 5 15
20 6 11
15 10 22
16 12 18
15
LAB 12:
Enter the value in SPSS and find mean, median, mode, p25, p50, p75, SD, variance, Range,
minimum, maximum from the following data.
Weight midvalue frequency
20-30 25 4
30-40 35 6
40-50 45 7
50-60 55 21
60-70 65 23
70-80 75 2
From the above table, we found that Mean Mid value = 50, Mean Frequency = 10.50, Median
Mid value = 50, Median Frequency = 6.50, Mode Mid Value = 25a, Mode Frequency = 2a, Std.
Deviation Mid Value = 17.708, Std. Deviation Frequency = 9.094, Variance Mid Value = 350,
Variance Frequency = 82.7 and so on as shown in the above table.
16
Lab 13:
find mean, median, mode, SD, and percentiles.
weight mid value frequency
20-30 25 4
30-40 35 6
40-50 45 7
50-60 55 21
60-70 65 23
70-80 75 2
80-90 85 3
From the above table, we found Mean = 9.43, Median = 6.00, Mode = 2a, SD = 8.772,
Variance = 76.952, Range = 21, Minimum = 2, Maximum = 23, p25 = 3, p50 = 6, p75 = 21.
17
Lab 14:
from the following fata find the regression equation y on x
x y
1 6
2 7
3 5
4 4
5 3
6 1
7 2
18
Lab 15:
Create two way ANOVA from the following Data.
Machine Type
Workmen
A B C
i 49 43 52
ii 51 45 57
iii 39 41 49
iv 38 43 51
19