Sagarmatha College For Higher Studies Probability Lab

Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

SAGARMATHA COLLEGE FOR HIGHER STUDIES

MAITIDEVI KATHMANDU

LAB WORK OF PROBABILITY AND STATISTICS

SUBMITTED BY SUBMITTED TO

SHITAL KUMAR AWAL BCA DEPARMENT OF SM


BCA 3RD SEMESTER COLLEGE
Introduction

The SPSS (statistical package for the social sciences) is software for editing and analysing all sorts
of data. These data may come from basically any source: scientific research a customer database
etc. SPSS can open all file formats that are commonly used for structured data such as

i) Spreadsheets from Ms. Excel or open office


ii) Plain text files (.txt or .csv)
iii) Relational (SQL)database
iv) Stata and SAS
When you use SPSS, you work in one of several windows: the data view, the variable view,
the output view, the draft output view and the script view. Eventually you will also use the
syntax editor to save or refine your queries.

The data view: The data view displays your actual data and any new variables you
have created.
The variable view: At the bottom of the data window, you ‘will notice a table labelled
variable view. The variable view window contains the definitions of each variable in
your data set including its name, label, size, alignment, and other information.
SPSS output window view: The output window is where you see the result of your various queries
such as frequency distributions, cross-tabs, statistical tests, and charts. If you have worked with
excel, you are probably used to seeing all your work on one page, charts, data, and calculations. In
SPSS, each window handles a separate task. The output window is where you see your result.
Advantage of using SPSS
1. Save time and effort, perform a job in a second that would require hours or days.
2. More exact calculations, avoiding rounding and approximations of manual calculation.
3. It allows working with large amount of data, using larger samples and including more
variables.
4. It allows transferring the attention from the mechanical task of calculation to the conceptual
tasks: decisions on the process, interpretation of the result and critical analysis.
5. SPSS is one of the most widely used tools in business research and other fields of social
sciences.
It is compatible with many other data management programs. Therefore, it allows
transmission of data from one program to another

Q1. Calculate mean, mode, 1st and 3rd quartiles and 95 percentiles and variance of the
data given below
Age of 21 22 23 24 25 26 27 28 29 20
student
No of 4 10 9 9 11 6 3 5 2 1
student

Solution
Interpretation of data

Click on data and click weight cases and replace the frequency and click ok

Then click on analyse and click descriptive statistics and click frequency replace x in variable table and click option
click mean, median, percentiles and variance and quartile and click on continue

Then click ok

Output
Result: As the given output have calculated mean = 24.45 and median= 24.00 and variance= 5.099 and 95 th
percentiles = 28.95 .respectively.

Q.2 calculate mean, median,1st and 3rd quartiles ,95 percentiles and variance of the data given below

Daily 0-200 200-400 400-600 600-800 800-1000 1000- 1200- 1400-


wages 1200 1400 1600
No of 50 70 160 200 280 120 100 20
person

Solution

Click on data and click weight cases and replace the frequency and click ok

Click transform and click on compute variable type mid value in target variable select bracket and then click u and
click arrow u will replace in numeric expression and click plus sign and then click l and click arrow l also replace
numeric expression and selsect divide sign and select 2 and click ok mid point will also in data view.

Then click on analyse and click descriptive statistics and click frequency replace mid value in variable table and click
option click mean, median, percentiles and variance and quartile and click on continue

Then click ok
Output
Result: in the given output ,we have calculate mean=7 90.00 and median= 900.00 and variance
= 106806.807 and 95 percentile = 1300.00 and 1 st and 3 rd quarticles hence it is verified.

Q3 psychological tests of intelligence of arithmetic ability were applied to 10 children . calculate


the correlation coefficient between intelligence ratio and arithmetic ratios and interpret your
results
child A B C D E F G H I J
I.R 105 104 102 101 100 99 98 96 93 92
A.R 101 103 100 98 95 96 104 92 97 94

Solution
Interpretation
1.Click on Analyze -> Correlate -> Bivariate
2.Move the two variables you want to test over to the Variables box on the right
3.Make sure Pearson is checked under Correlation Coefficients
4.Press OK
5.The result will appear in the SPSS output viewer

Output
Result : we have calculated the correlation of ir and ar of the given data.

Q 4 The following table shows the ages styolic blood pressure of random selected eight
persons between ages 35 and 60.
Ages 56 42 60 50 54 49 39 45
Blood 160 130 125 135 145 115 140 120
pressure

Estimate the equation of the above data and also calculate the blood pressure when age is 65.

Solution
Interpretation
Enter values of the variables age and bp
Click analyze-> regression-> linear
Move age into independent and bp into dependent . then click ok

Output
Result : we have calculated regression of given bp and age of the given data.
Q 5 probability of getting success P=1/5 and number of trial n=10 (use binomial distribution)
i)P(X=4) ii)P(X=0) iii) P(X<3) iv) P(X<=3) v)P(X>4)

solution
Interpretation of data
For binominal probability distribution function(pdf)
1.Click on transform->compute variable
2.type Target Variable. select PDF &Noncentral PDF in function group.
3. select PDF binomial in function and special variables. click on up arrow. Then in Numeric
Expression we will see PDF.BINOM( ? , ?, ?) . Put values PDF.BINOM(X,10,0.2). Click ok.

For binomial cumulative distribution function (CDF)


1. Select Transform-> compute variable
2. Type in Target Variable . select CDF &Noncentral CDF in function group
3. Select CDF binomial in function and special variables. Click on up arrow. Then in
Numeric Expression we will see CDF.BINOM (?,?,?) . put values CDF.BINOM(X,10,0.2).
Click ok

Result :using the given value of the question we have calculate the binominal distribution in the
help cdf and pdf format of distribution.

Q6. Given ᵰ=4.2 for a poisson distribution. Find


i) P(X=8) ii) P(X<=2) iii) P(X>2)

Solution
Interpretation of data
For passion probability distribution function(pdf)
1.Click on transform->compute variable
2.type Target Variable. select PDF &Noncentral PDF in function group.
3. select PDF Possion in function and special variables. click on up arrow. Then in Numeric
Expression we will see PDF.BINOM( ?, ?) . Put values PDF.BINOM(X,4.2). Click ok.

For possion cumulative distribution function (CDF)


4. Select Transform-> compute variable
5. Type in Target Variable . select CDF &Noncentral CDF in function group
6. Select CDF possion in function and special variables. Click on up arrow. Then in Numeric
Expression we will see CDF.POSSION (?,?) . put values CDF.POSSION(X,4.2). Click ok
Result: we obtain the following information from the above table. there are way to calculate
the possion distribution in different ways.
Q 7. Four Salesmen were posted in different areas by a company. The number of units of
commodity sold by them are as follows:
A: 20 23 28 21
B: 25 32 30 21
C: 23 28 35 18
D: 15 21 19 25

Is there a significant difference in the performance of these salesmen?

Solution

Output
Result : since calculated value of F is less than tabulated value of the null hypothesis Ho is accepted. Therefore, we
conclude that there is significant difference in company productivity in different salesman.

8. The following table gives the number of refrigerators sold by 3 salesmen in three months May, June
and July
Month Salesmen
A B C
May 50 40 48
June 46 48 50
July 39 44 40

i) Is there a significant difference in the sales made by the four salesmen ?


ii) Is there a significant difference in the sales made during different months?

Solution:
INTERPRETATION OF DATA

1) Click analyse -> general linear model-> univariate


2) Drag value in dependent variable and drag other two in fixed factor
3) Click model and select build term and change interaction to two ways and drag th e variable into another
place
4) And change sum of square in to type ii and click continue
5) And click ok

Output
Result : f calculated is greater than f tabulated hence it is verified that there is significant difference in number of
Refrigenerator sold by 3 salesmen.

You might also like