You are on page 1of 73

LAB REPORT FILE

STATISTICAL METHODS
AND
ALGORITHM
(PCL105)

By:AKSHAY SHARMA
801524003
M.E. CIVIL (STRUCTURES)

Name: __________________________________________________________________

Branch: _________________________________________________________________

Roll No.:________________________________________________________________

This is certified to be the bonafide work of the student in the


_______________________________________________________________________
during the academic year 20__ / 20__ in the ________semester.

_____________________________
Teacher In-charge

Date:-________________________

_____________________________
Stamp of School

CONTENTS
Page No.

1. LAB-WORK of 28/07/2015 ............................................................. 01-06


2. LAB-WORK of 04/08/2015 ............................................................. 07-24
3. LAB-WORK of 11/08/2015 ............................................................. 25-43
4. LAB-WORK of 18/08/2015 ............................................................. 44-47
5. LAB-WORK of 25/08/2015 ............................................................. 48-70

28/07/2015

Q1.

X:
Y:

Find the mean, median, mode, quartiles, variance, standard deviation, minima, maxima
and range of value of X and Y
92
81

77
84

87
86

89
90

64
73

81
84

83
90

84
88

82
80

96
91

Ans1.
Step-1 In the variable view set the variables X and Y.

Step-2 Then in the data view enter the values of data under variables X and Y.

Step-3 Go to Analyze menu choose Descriptive Statistics select Frequencies.

28/07/2015

Step-4 Under Frequencies move both the variables X and Y from left side to right side
click on Statistics mark all the required fields to be calculated i.e. mark mean,
median, mode, quartiles, variance, standard deviation, minima, maxima and range click
on continue click OK.

28/07/2015

The output will be as follows:

28/07/2015

Ans1. Part-b
Step-1 In the variable view set the variables X and Y.

Step-2 Then in the data view enter the values of data under variables X and Y.

Step-3 Again go to the variable view and here under missing option enter the value 89 in
variable X and values 84, 90 in variable Y.

28/07/2015

Step-4 Go to Analyze menu choose Descriptive Statistics select Frequencies.

Step-4 Under Frequencies move both the variables X and Y from left side to right side
click on Statistics mark all the required fields to be calculated i.e. mark mean,
median, mode, quartiles, variance, standard deviation, minima, maxima and range click
on continue click OK.

28/07/2015

The output will be as follows:

04/08/2015

Q1.

Generate employees data of department in the university consisting of the following


variables:
A. Name
B. Designation
1. Peon,
2. Clerk,
3. Lecturer,
4. Assistant professor,
5.Associate professor,
6. Professor
C. Age
D. Gender
E. Qualification
1.Matric,
2.Intermediate,
3. Diploma,
4.Graduation,
5.Post Graduation,
6.Doctorate,
7.Post-Doctorate.
F. Salary
1.Low Income,
2.Middle Income,
3. High Income,
4.Between Low & Middle Income,
5. Between Middle & High Income
G. Number of Subjects taught per semester.
H. Category of Subjects
1.B.Tech,
2.M.Tech ,
3.M.Sc.,
4.B.Tech. & M.Sc.
7

04/08/2015

5.B.tech. & M.Tech.,


6. M.Sc. & M.Tech.,
7. B.tech & M.Sc. & M.Tech.
I. Number of students supervised
J. Category of supervision
1.B.Tech project,
2.M.Tech project ,
3.M.Sc. project,
4.B.Tech. project & M.Sc. project
5.B.tech. project & M.Tech. project,
6.M.Sc. project & M.Tech. project,
7.B.tech project & M.Sc. project & M.Tech. project
Draw frequencies and percentage.
Graphs :Bar Chart, Pie Chart
Ans1.
Step-1 Under the variable view set the 10 variables as described in the question.

04/08/2015

Step-2 Under the data view enter the data for these variables.

Step-3 Go to Analyze menu choose Descriptive Statistics select Frequencies.

The frequency table will be as follows:

04/08/2015

10

04/08/2015

11

04/08/2015

12

04/08/2015

Step-4 Go to chart builder under Graphs option.

13

04/08/2015

Step-5 A pop-up window will open. Under this window under Gallery option select the desired
graph type and then drag the variables on the x-axis and y-axis of the graph preview .Then
click on OK button.

Step-6 Step-4 and Step-5 are repeated several times to make the required bar charts and pie charts
as shown below:

14

04/08/2015

BAR CHARTS

15

04/08/2015

16

04/08/2015

17

04/08/2015

18

04/08/2015

19

04/08/2015

PIE CHARTS

20

04/08/2015

21

04/08/2015

22

04/08/2015

23

04/08/2015

24

11/08/2015

Q1.

The following table gives the rural and urban population of a state in four successive year:

CENSUS YEAR
POPULATION

URBAN
RURAL

1971
1.40
0.25

1981
1.58
0.48

1991
2.72
1.39

2001
4.05
1.39

1. Draw :
a. Stacked Bar Diagram
b. Clustered Bar Diagram to depict the comparison between rural and urban
population in the state.
Ans- a.
Step-1 In the variable view define the parameters.

Step-2 In the data view enter the data.

Step-3. Go to chart builder under Graphs option.

25

11/08/2015

Step-4 A pop-up window will open. Under this window under Gallery option select the desired
graph type and then drag the variables on the x-axis and y-axis of the graph preview .Then
click on OK button.

Step- 5 The stacked bar diagram will be shown in the output file as below:-

26

11/08/2015

Ans-b.
Step-1 In the variable view define the parameters.

Step-2 In the data view enter the data.

Step-3 Under the variable view. Go to chart builder under Graphs option.

Step-4 A pop-up window will open. Under this window under Gallery option select the desired
graph type and then drag the variables on the x-axis and y-axis of the graph preview .Then
click on OK button.

27

11/08/2015

Step- 5 The clustered bar diagram will be shown in the output file as below:-

28

11/08/2015

Q2.

The following table relates to the investment on different heads under third five year plan:

ITEM
Agriculture and Community Development
Major and Minor irrigation
Power
Village and Small Industries
Industries and Minerals
Transport and Communication
Social Services
Inventories

INVESTMENT
1475
640
975
435
2500
1650
1725
800

1. Depict the data by:


a. Bar Diagram
b. Pie Diagram
2. Make histogram and check whether data is normal.
Ans1. Part-a. BAR DIAGRAM
Step-1 In the variable view define the parameters.

Step-2 In the data view enter the data.

29

11/08/2015

Step-3 Under the variable view. Go to chart builder under Graphs option.

Step-4 A pop-up window will open. Under this window under Gallery option select the desired
graph type and then drag the variables on the x-axis and y-axis of the graph preview .Then click
on OK button.

30

11/08/2015

Step- 5 The bar diagram will be shown in the output file as below:-

Ans1. Part-b. PIE-CHART


Step-1 In the variable view define the parameters.

Step-2 In the data view enter the data.

31

11/08/2015

Step-3 Under the variable view. Go to chart builder under Graphs option.

Step-4 A pop-up window will open. Under this window under Gallery option select the desired
graph type and then drag the variables on the x-axis and y-axis of the graph preview .Then
click on OK button.

32

11/08/2015

Step- 5 The pie diagram will be shown in the output file as below:-

Ans2. MAKING A HISTOGRAM


Step-1 In the variable view define the parameters.

Step-2 In the data view enter the data.

33

11/08/2015

Step-3 Under the variable view. Go to chart builder under Graphs option.

Step-4 A pop-up window will open. Under this window under Gallery option select the desired
graph type and then drag the variables on the x-axis and y-axis of the graph preview .Then click
on OK button.

34

11/08/2015

Step-5 The histogram diagram will be shown in the output file as below:-

Check for normality of data:A data is said to be normal if


i.
MEAN=MODE=MEDIAN
ii.
Kurtosis=3
iii.
Skewness=0
So here, procedure for checking normality is
1. Go to Descriptive Statistics under Analyze Menu. Choose the Frequencies option.

2. Under this option, move the variables for considerations and choose the Statistics button.
3. Under statistics option tick-mark all the relevant markers.
35

11/08/2015

4. Click on continue and then click ok

5. In the output youll find the parameters calculated by the software as follows:

Here, Mean Mode Median


Kurtosis 3 and also Skewnwss 0
So, data is not normal.

36

11/08/2015

Q3.

The following are the industries of the breaking strength of a sample of 60 linen threads:-

32.50
21.20
27.30
20.60
25.40
36.40

15.20
28.30
33.70
29.50
34.10
24.60

35.40
27.10
29.40
21.80
27.50
28.90

21.30
25.00
21.90
37.50
29.60
24.80

28.40
32.70
29.30
33.50
22.20
28.10

26.90
29.50
17.30
29.60
22.70
25.40

34.60
30.20
29.00
26.80
31.30
34.50

29.30
23.90
36.80
28.70
33.20
23.60

24.50
23.00
29.20
34.80
37.00
38.40

31.00
26.40
29.50
18.60
28.30
24.00

1. Group these measurements into a frequency distribution having the classes


a. 15.0-19.9
b. 20.0-24.9
c. 25.0-29.9
d. 30.0-34.9
e. 35.0-39.9
2. Draw the histogram frequency chart and frequency curve for this distribution.
Ans1.
Step-1 Enter the data in the data view after entering a suitable variable name under variable
view.

ENTER THE DATA HERE

37

11/08/2015

Step-2 Under the Transform Menu, Select compute variables option.

Step-3 In compute variable option enter the variable name .Set the value for the variable in the
numerical expression part and set the condition by clicking the If button at bottom left of
the pop of compute variable.

A pop window will open and here we have to enter the condition for including the cases that
satisfy the condition. Then click on continue button and then click OK in compute variable
window.

38

11/08/2015

Step-6 Go to the Data View, here a new class will be formed containing the values for the
specified condition.

39

11/08/2015

Step-7 Repeat the steps1-6 for constructing the other classes. Then the data view will be as
follows:

40

11/08/2015

Now histogram charts:-

41

11/08/2015

42

11/08/2015

43

18/08/2015

Q1.

25 people were surveyed to find their attitude towards physical exercise. They were also
asked their age, number of hours per week in physical exercise and whether they
participated in team sports.
a. Determine whether the continuous variable is normal or not.
b. Is the variable hour of exercise normally distributed? Transform the variable in
such a way that the transformed variable is normally distributed.
c. Record the variable age in such a way that we are able to know the number of
person with age greater than 40
d. Insert a variable containing sum of all non-continuous variables.
e. Insert a variable demonstrating the use of if condition selecting suitable existing
variable.

Ans1.
Step-1 In the variable view, define the variables i.e. NAME, AGE, NUMBER_OF_HOURS,
PARTICIPATION_IN_TEAM_SPORTS, ATTITUDE_TOWARDS_PHYS._EXERCISE.

Step-2 In the data view, enter the data for these variables.

44

18/08/2015

Step-3 To know about number of person with age greater than 40; under Transform menu
option choose compute variable option.

Step-4 Under Compute Variable enter Target variable as AGE_GREATER_THAN_40 and


for numeric expression write AGE and use if condition as AGE > 40.

45

18/08/2015

Now, the data view will be as follows:

46

18/08/2015

Step-5 To know the sum non-continuous variables i.e. AGE, NUMBER_OF_HOURS; Under
Compute Variable enter Target variable as sum and for numeric expression write
AGE+NUMBER_OF_HOURS.

Now, the data view will be as follows:

47

25/08/2015

Q1.

Ten coins are thrown simultaneously. Consider the following questions:


a. Find the probability distribution of number of heads obtained and draw a
histogram.
b. Find cdf and make cdf plot.
c. Find the probability of getting atleast 7 heads.

Ans1. Part-a
Step-1 In the variable view define the variable X for number of heads when ten coins are
thrown simultaneously. In the data view enter the values of X from 0 to 10.

48

25/08/2015

Step-2 To calculate probability distribution under Transform menu option choose compute
variable option.

Step-3 Under Compute Variable enter Target variable as P and for numeric expression
choose the function group PDF & Noncentral PDF and under this group choose
Pdf.Binom (under Functions and Special variables) then in the numeric expression
tab enter the values for PDF.BINOM(?,?,?) as PDF.BINOM(X,10,0.5).

49

25/08/2015

Step-4 In the data view well get the values of P for each value of X.

Step-5 Now, for making the pdf plot: Graphs Chart Builders Histogram Drag X on
x-axis and P on y-axis Click on Ok. The histogram will be as follows:-

50

25/08/2015

Ans1. Part-b
Step-1 In the variable view define the variable X for number of heads when ten coins are
thrown simultaneously. In the data view enter the values of X from 0 to 10.

Step-2 To calculate cumulative distribution under Transform menu option choose compute
variable option.

51

25/08/2015

Step-3 Under Compute Variable enter Target variable as C and for numeric expression
choose the function group CDF & Noncentral CDF and under this group choose
Cdf.Binom (under Functions and Special variables) then in the numeric expression
tab enter the values for CDF.BINOM(?,?,?) as CDF.BINOM(X,10,0.5).

Step-4 In the data view well get the values of C for each value of X.

52

25/08/2015

Step-5 Now, for making the cdf plot: Graphs Chart Builders Histogram Drag X on
x-axis and C on y-axis Click on Ok. The histogram will be as follows:-

53

25/08/2015

Ans1. Part-c
Step-1 Repeat the steps 1 to 4 of part-a.
Step-2 Again go to the Transform menu choose compute variable option.
In the Target Variable write A (which stands for proababilty (X7)), in the numeric
expression write P along with If condition X 7.

54

25/08/2015

The data view will be as follows:

Step-3 To find P(X 7) follow as:


Analyze menu Descriptive Analysis Frequencies Move variable A from left
side to right side choose Statistics under central tendencies mark sum click
continue click ok.
The result will be as follows:

So, the probability of getting atleast 7 heads = 0.1719

55

25/08/2015

Q2.

A manufacturer knows that 5% of his products are defective if he sells items in the box of
100 and guarantee that not more than 10 items will be defective. What is the approximate
probability that a box will fail to meet the guaranteed quality?

Ans2. Part-a
Step-1 In the variable view define the variable X. In the data view enter the values of X
from 0 to 10.

Step-2 To calculate probability distribution under Transform menu option choose compute
variable option.

56

25/08/2015

Step-3 Under Compute Variable enter Target variable as P and for numeric expression
choose the function group PDF & Noncentral PDF and under this group choose
Pdf.Poisson (under Functions and Special variables) then in the numeric expression
tab enter the values for PDF.POISSON(?,?) as PDF. POISSON (X,5).

Step-4 In the data view well get the values of P for each value of X.

57

25/08/2015

Step-5 Now, for making the pdf plot: Graphs Chart Builders Histogram Drag X on
x-axis and P on y-axis Click on Ok. The histogram will be as follows:-

58

25/08/2015

Ans2. Part-b
Step-1 In the variable view define the variable X. In the data view enter the values of X
from 0 to 10.

Step-2 To calculate cumulative distribution under Transform menu option choose compute
variable option.

59

25/08/2015

Step-3 Under Compute Variable enter Target variable as C and for numeric expression
choose the function group CDF & Noncentral CDF and under this group choose
Cdf.Poisson (under Functions and Special variables) then in the numeric expression
tab enter the values for CDF. POISSON (?,?) as CDF. POISSON (X,5).

Step-4 In the data view well get the values of C for each value of X.

60

25/08/2015

Step-5 Now, for making the cdf plot: Graphs Chart Builders Histogram Drag X on
x-axis and C on y-axis Click on Ok. The histogram will be as follows:-

61

25/08/2015

Ans2. Part-c Computing the probability that box will fail to meet the guaranteed quality:Step-1 Repeat the steps 1-4 of Part-b of this question.
Step-2 Again go to the Transform menu choose compute variable option.
In the Target Variable write A with If condition X =10.Write the 1-C in numeric
expression. Click Ok.

The data view will be as follows:-

So, Probability of coming not more than ten items defective from a box of 100 = 0.0137
62

25/08/2015

Q3.

Products produced by a machine has 3% defective rate. What is the probability that the
first defect occur in the 5th item inspected?

Ans3.
Step-1 In the variable view define the variable X. In the data view enter the values of X
from 0 to 5.

Step-2 To calculate probability distribution under Transform menu option choose compute
variable option.

63

25/08/2015

Step-3 Under Compute Variable enter Target variable as P and for numeric expression
choose the function group PDF & Noncentral PDF and under this group choose
Pdf.Geom (under Functions and Special variables) then in the numeric expression
tab enter the values for PDF.GEOM(?,?) as PDF.GEOM (X,0.03).

Step-4 In the data view well get the values of P for each value of X.

64

25/08/2015

Step-5 To calculate the probability that the first defect occur in the 5th item when inspected:
Again go to the Transform menu choose compute variable option.
In the Target Variable write A with If condition X =5.Write the P in numeric
expression. Click Ok.

65

25/08/2015

The data view will be as follows:

So, the probability that the first defect occur in the 5th item when inspected = 0.265587843
0.2656

66

25/08/2015

Q4.

Ten is the average number of oil tankers arriving each day at a certain port. The facilities
at the port can handle atmost 15 tankers per day. What is the probability that a given day
tankers have to turned away?

Ans4. ( = 10)
Step-1 In the variable view define the variable X. In the data view enter the values of X
from 0 to 15.

Step-2 To calculate probability distribution under Transform menu option choose compute
variable option.

67

25/08/2015

Step-3 Under Compute Variable enter Target variable as P and for numeric expression
choose the function group PDF & Noncentral PDF and under this group choose
Pdf.Poisson (under Functions and Special variables) then in the numeric expression
tab enter the values for PDF.POISSON(?,?) as PDF. POISSON (X,10).

Step-4 Under Compute Variable enter Target variable as C and for numeric expression
choose the function group CDF & Noncentral CDF and under this group choose
Cdf.Poisson (under Functions and Special variables) then in the numeric expression
tab enter the values for CDF. POISSON (?,?) as CDF. POISSON (X,10).

68

25/08/2015

The data view will be

Step-5 To calculate the probability that a given day tankers have to turned away:
Again go to the Transform menu choose compute variable option.
In the Target Variable write A with If condition X =15.Write the 1-C in numeric
expression. Click Ok.

69

25/08/2015

The data view will be

So, the probability that a given day tankers have to turned away = 0.0487

70

You might also like