0% found this document useful (0 votes)
10 views

Practical Final PDF

Uploaded by

wowbbsr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Practical Final PDF

Uploaded by

wowbbsr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

EXPERIMENT:-1

Draw a bar chat and pie chart

US state Frequency

Florida 203

Hawali 51

South Carolina 34

California 33

Texas 23

Others 16

1
AIM OF THE EXPERIMENT:-

To draw a bar chat and pie chart of given data.

THEORY:-

BAR Chat:

A bar chart is a way of showing the distribution of data with a discrete data set . Bar charts can be
represented horizontally or vertically, they can also represent more than one set of data.

PIE Chat

A pie chart, sometimes called a circle chart, is a way of summarizing a set of nominal data or displaying
the different values of a given variable. This type of chart is a circle divided into a series of segments.

STEPS:-

1. Go to variable view.

2. Enter US state and frequencies.

3. Go to data view.

4. Enter US state and frequencies data.

→select chart →select bar chat and pie chart→ press OK.

OUT PUT:

for BAR chart:

Statistics

Frequency

Valid 360
N
Missing 0

2
Frequency

Frequency Percent Valid Percent Cumulative


Percent

16.00 16 4.4 4.4 4.4

23.00 23 6.4 6.4 10.8

33.00 33 9.2 9.2 20.0

Valid 34.00 34 9.4 9.4 29.4

51.00 51 14.2 14.2 43.6

203.00 203 56.4 56.4 100.0

Total 360 100.0 100.0

Chart Title

250

200

150

100

50

0
1 2 3 4 5 6 7

US state Frequency

3
For PIE chart:-

Statistics

Frequency

Valid 360
N
Missing 0

Frequency

Frequency Percent Valid Percent Cumulative


Percent

16.00 16 4.4 4.4 4.4


23.00 23 6.4 6.4 10.8

33.00 33 9.2 9.2 20.0

Valid 34.00 34 9.4 9.4 29.4

51.00 51 14.2 14.2 43.6


203.00 203 56.4 56.4 100.0

Total 360 100.0 100.0

Frequency

6% 5% Florida

9% Hawali
South Carolina
10%
56% California

14% Texas
Others

4
CONCLUSION:-

In this practical, we created a bar chart and a pie chart to visualize the given data. The bar chart highlighted
comparative values across categories, while the pie chart effectively showed the proportional distribution,
enhancing our understanding of the data.

5
EXPERIMENT:-2

Find out mean, median, mode and sum of the following problem.
NO. OF ITEMS FREQUENCY
0 2

1 4

2 4

3 8
4 4

5 4

6 5

7 6
8 2

9 8

10 12

11 14
12 3

13 4

14 6

6
AIM OF THE EXPERIMENT:

To calculate the mean, median, mode and sum of the given data.

FORMULA:-

Mean:

The formula for calculating mean for ungrouped data is

M = ∑X / N

Median:

a) When N is odd, and

b) When N is even.

Where N is odd median can be calculated by formula

Median = (n+1)/2th item

Mode:

The mode in statistics refers to a number in a set of numbers that appears the most often. For example, if a
set of numbers contained the following digits, 1, 1, 3, 5, 6, 6, 7, 7, 7, 8, the mode would be 7, as it appears
the most out of all the numbers in the set.

Sum:

The sum of a dataset is the addition of all values in the dataset. This applies only to quantitative variables

STEPS:

1. Go to variable view.

2. Enter no. of time (variable) and frequencies.

3. Go to data view.

4. Enter times and frequencies.

5. Go to data→ select weight case →weight cases by→ move frequency to right hand side →press OK

6.Go to analyze → descriptive statistics → select frequencies → move the variable to right hand side
→select statistics →select Mean, Median, mode → press OK.

7
OUT PUT:-

Statistics
items
Valid 86
N
Missing 0
Mean 7.8837
Median 9.0000
Mode 11.00
Sum 678.00

items
Frequency Percent Valid Percent Cumulative
Percent
.00 2 2.3 2.3 2.3
1.00 4 4.7 4.7 7.0
2.00 4 4.7 4.7 11.6
3.00 8 9.3 9.3 20.9
4.00 4 4.7 4.7 25.6
5.00 4 4.7 4.7 30.2
6.00 5 5.8 5.8 36.0
7.00 6 7.0 7.0 43.0
Valid
8.00 2 2.3 2.3 45.3
9.00 8 9.3 9.3 54.7
10.00 12 14.0 14.0 68.6
11.00 14 16.3 16.3 84.9
12.00 3 3.5 3.5 88.4
13.00 4 4.7 4.7 93.0
14.00 6 7.0 7.0 100.0
Total 86 100.0 100.0

8
CONCLUSION:-
From above observation by using SPSS we conclude that
Mean :-7.8837
Median :- 9
Mode :- 11
Sum :- 678

9
EXPERIMENT:-3
Find the range ,variance and standard deviation of the following problem

x 2 4 4 8 4 5 2 4 2 1

10
AIM OF THE EXPERIMENT :

To calculate the range , variance and standard deviation of the given data.

FORMULA

STEPS:-

1. Go to variable view.

2. Enter X (variable).

3. Go to data view.

4. Enter the value of X.

5.Go to analyze→ descriptive statistics → select frequencies → move the variable to right hand side
→select statistics →select range, variance and standard deviation → press OK.

11
OUT PUT:

Statistics
x
Valid 10
N
Missing 5
Std. Deviation 2.01108
Variance 4.044
Range 7.00

x
Frequenc Percent Valid Cumulative
y Percent Percent
1.00 1 6.7 10.0 10.0
2.00 3 20.0 30.0 40.0
4.00 4 26.7 40.0 80.0
Valid
5.00 1 6.7 10.0 90.0
8.00 1 6.7 10.0 100.0
Total 10 66.7 100.0
Missing System 5 33.3
Total 15 100.0

CONCLUSION:-

From above observation by using SPSS we conclude that


Standard Deviation :- 2.01108

Variance :- 4.044

Range :- 7

12
EXPERIMENT:-4

Find the range, variance and standard deviation of the following problem

Y 2 5 6 8 9 5 8 10

F 5 25 4 8 10 9 16 20

13
AIM OF THE EXPERIMENT:

To calculate the range, variance and standard deviation of the given data.

FORMULA:

STEPS:

1. Go to variable view.

2. Enter no. of Y (variable) and frequencies.

3. Go to data view.

4. Enter value of the variable Y and frequencies.

5. Go to data→ select weight case →weight cases by→ move frequency to right hand side →press OK

6.Go to analyze→ descriptive statistics → select frequencies → move the variable to right hand side
→select statistics →select range, variance, and standard deviation → press OK

14
OUT PUT:

Statistics
Y
Valid 97
N
Missing 0
Std. Deviation 2.30148
Variance 5.297
Range 8.00

Y
Frequenc Percent Valid Cumulative
y Percent Percent
2.00 5 5.2 5.2 5.2
5.00 34 35.1 35.1 40.2
6.00 4 4.1 4.1 44.3
Valid 8.00 24 24.7 24.7 69.1
9.00 10 10.3 10.3 79.4
10.00 20 20.6 20.6 100.0
Total 97 100.0 100.0

CONCLUSION :-
From above observation by using SPSS we conclude that

Standard deviation :- 2.30148

Variance :- 5.297

Range :- 8

15
EXPERIMENT:-5

Obtain the skewness and kurtosis for the following frequency distribution.
X 4 5 3 1 2 6 7 8 9 10 11 12

F 8 9 15 18 20 4 2 4 5 2 2 1

16
AIM OF THE EXPERIMENT:

To Calculate the skewness and kurtosis for the given frequency distribution.

THEORY :

Skewness measures the degree of asymmetry of the distribution, while kurtosis measures the degree of
peakedness and flatness of a distribution. Skewness is the third measure of moments, while kurtosis is the
fourth measure of moments. The value of both skewness and kurtosis ranges from – infinity to +infinity.

STEPS:

1. Go to variable view.

2. Enter no. of X (variable) and frequencies.

3. Go to data view.

4. Enter value of the variable X and frequencies.

5. Go to data→ select weight case →weight cases by→ move frequency to right hand side →press OK

6.Go to analyze→ descriptive statistics → select frequencies → move the variable to right hand side
→select statistics →select the skewness and kurtosis → press OK.

OUT PUT :

Statistics
X
Valid 90
N
Missing 0
Skewness 1.100
Std. Error of
.254
Skewness
Kurtosis .312
Std. Error of Kurtosis .503

17
X
Frequenc Percent Valid Cumulative
y Percent Percent
1.00 18 20.0 20.0 20.0
2.00 20 22.2 22.2 42.2
3.00 15 16.7 16.7 58.9
4.00 8 8.9 8.9 67.8
5.00 9 10.0 10.0 77.8
6.00 4 4.4 4.4 82.2
Valid 7.00 2 2.2 2.2 84.4
8.00 4 4.4 4.4 88.9
9.00 5 5.6 5.6 94.4
10.00 2 2.2 2.2 96.7
11.00 2 2.2 2.2 98.9
12.00 1 1.1 1.1 100.0
Total 90 100.0 100.0

CONCLUSION :-
From above observation by using SPSS we conclude that

Skewness :- 1.100

Kurtosis :- 0.312

18
EXPERIMENT:-6

Obtain the skewness and kurtosis for the following frequency distribution.
X 150 190 220 260 300 340 380

F 40 60 150 250 290 310 320

19
AIM OF THE EXPERIMENT:

To calculate the skewness and kurtosis for the given frequency distribution.

THEORY:

Skewness measures the degree of asymmetry of the distribution, while kurtosis measures the degree of
peakedness and flatness of a distribution. Skewness is the third measure of moments, while kurtosis is the
fourth measure of moments. The value of both skewness and kurtosis ranges from – infinity to +infinity.

STEPS:

1. Go to variable view.

2. Enter no. of X (variable) and frequencies.

3. Go to data view.

4. Enter value of the variable X and frequencies.

5. Go to data→ select weight case →weight cases by→ move frequency to right hand side →press OK

6.Go to analyze→ descriptive statistics → select frequencies → move the variable to right hand side
→select statistics →select the skewness and kurtosis → press OK

OUT PUT:

Statistics
X
Valid 1420
N
Missing 0
Skewness .360
Std. Error of
.065
Skewness
Kurtosis -.750
Std. Error of Kurtosis .130

20
X
Frequency Percent Valid Cumulative
Percent Percent

150.00 40 2.8 2.8 2.8


190.00 60 4.2 4.2 7.0
220.00 150 10.6 10.6 17.6
240.00 310 21.8 21.8 39.4
Valid
260.00 250 17.6 17.6 57.0
300.00 290 20.4 20.4 77.5
380.00 320 22.5 22.5 100.0
Total 1420 100.0 100.0

CONCLUSION :-
From above observation by using SPSS we conclude that

Skewness = 0.360

Kurtosis = -0.750

21
EXPERIMENT:-7

Find out mean, median, mode , range ,variance, standard deviation, skewness and kurtosis of the following problem.

X 43 44 46 40 44 42 45 42 38 40 42 57

F 29 31 19 18 27 27 27 29 41 30 26 10

22
AIM OF THE EXPERIMENT :

To calculate the mean, median, mode, range, variance, standard deviation , skewness and kutosis of the
given data.

THEORY:

The mean means average . To find it , add together all of your values and divide by the number of addends.
The median is the middle number of your data set when in order from least to greatest. The mode is the
number that occurred the most often. The range is the difference between the highest and lowest values.

Variance is a measure of how data points vary from the mean , whereas standard deviation is the measure
of the distribution of statistical data.

Skewness measures the degree of asymmetry of the distribution, while kurtosis measures the degree of
peakedness and flatness distribution . Skewness is the third measure of moments, while kurtosis is the fourth
measure of moments. The value of both skewness and kurtosis ranges from – infinity to +infinity.

STEPS:

1. Go to variable view.

2. Enter no. of X (variable) and frequencies.

3. Go to data view.

4. Enter value of the variable X and frequencies.

5. Go to data→ select weight case →weight cases by→ move frequency to right hand side →press OK

6. Go to analyze → descriptive statistics → select frequencies → move the variable to right hand side
→select statistics →select the mean, median, mode , range ,variance, and standard deviation and skewness
and kurtosis → press OK

23
OUT PUT:
Statistics
X
Valid 314
N
Missing 0
Mean 42.6115
Median 42.0000
Mode 42.00
Std. Deviation 3.47910
Variance 12.104
Skewness 1.997
Std. Error of Skewness .138
Kurtosis 7.041
Std. Error of Kurtosis .274
Range 19.00

X
Frequenc Percent Valid Cumulative
y Percent Percent
38.00 41 13.1 13.1 13.1
40.00 48 15.3 15.3 28.3
42.00 82 26.1 26.1 54.5
43.00 29 9.2 9.2 63.7
Valid 44.00 58 18.5 18.5 82.2
45.00 27 8.6 8.6 90.8
46.00 19 6.1 6.1 96.8
57.00 10 3.2 3.2 100.0
Total 314 100.0 100.0
CONCLUSION :-
From above observation by using SPSS we conclude that

Mean = 42.6115
Median = 42
Mode = 42
Std. Deviation = 3.47910
Variance = 12.104
Skewness = 1.997
Kurtosis = 7.041
Range = 19

24
EXPERIMENT:-8

A random sample of 10 boys had the following IQ.

X 70 120 110 88 83 95 98 107 100

25
AIM OF THE EXPERIMENT:

Calculate a random sample of 10 boys had the given IQ.

ANSWER:

Let

Ho:=100

H1:100

Formula:

tn-1=(x̅-)/(s/√n)

where S=√((y-y̅)2/n-1)

if p<0.05 reject the null hypothesis

if p>0.05 accept the null hypothesis

STEPS:

1. Go to variable view.

2. Enter no. of X (variable).

3. Go to data view.

4. Enter value of the variable X.

5.Go to analysis tab → click on compare means →choose one sample T – test → then move x to the test
variables box → insert test value as 100 →click ok.

26
OUT PUT:

One-Sample Statistics
N Mean Std. Std. Error
Deviation Mean
X 9 96.7778 15.07297 5.02432

One-Sample Test
Test Value = 100
t Df Sig. (2- Mean 95% Confidence Interval of
tailed) Difference the Difference
Lower Upper
X -.641 8 .539 -3.22222 -14.8083 8.3639

CONCLUSION:

Here the P value is P=0.53 which is > 0.05 , so we accept the null hypothesis and we conclude that
population mean of IQ of the student is 100.

27
EXPERIMENT:-9

From a population of a college student,10 students were randomly selected their weekly pocket money was
observed as.

NO. 1 2 3 4 5 6 7 8 9 10

Pocket 20 22 21 15 25 19 18 20 21 22
money
in Rs.

Test whether the sample supports that on an average the student get 25 pocket money.

28
AIM OF THE EXPERIMENT:

To calculate the sample supports that on an average the student get 25 pocket money.

ANSWER:

Let

Ho:=25

Ho:25

Formula:

tn-1=(x̅-)/(s/√n)

where S=√((y-y̅)2/n-1)

if p<0.05 reject the null hypothesis

if p>0.05 accept the null hypothesis

STEPS:

1. Go to variable view.

2. Enter no. of X (variable).

3. Go to data view.

4. Enter value of the variable X.

5. Go to analysis tab → click on compare means →choose one sample T – test → then move x to the test
variables box → insert test value as 100 → click ok

29
OUT PUT:

One-Sample Statistics
N Mean Std. Std. Error
Deviation Mean
RS 10 20.3000 2.66875 .84393

One-Sample Test
Test Value = 25
t Df Sig. (2- Mean 95% Confidence Interval of
tailed) Difference the Difference
Lower Upper
RS -5.569 9 .000 -4.70000 -6.6091 -2.7909

CONCLUSION:

Since the p – value is much less then 0.05 , you reject the null hypothesis . this indicates there is strong
evidence to suggest that the average pocket money of the students is significantly different from 25 Rs.

30
EXPERIMENT:-10

The nicotine contain in milligram of two samples of tobacco were found to be as follows

Sample A 24 27 26 21 25

Sample B 27 30 28 31 22 36

Can it be said two samples come from normal populations having the same mean.

31
AIM OF THE EXPERIMENT :

To solve the given problem .

ANSWER:

Let

Ho:1=2

Ho:12

Formula:

tn1+n2-2=(x̅1- x̅2)/(s√(1/n1)+(1/n2))

if p<0.05 reject the null hypothesis

if p>0.05 accept the null hypothesis

STEPS:

1. Go to variable view.

2.Enter variable and sample and also add level s1 and s2 for 1 and 2.

3.Go to data view

4.Enter the values of variable (1,2) and samples.

5.Go to analyze → select compare means→ select independent samples T- Test move sample to test
variables and variable to grouping variable→ select define groups →select use specified values and enter
1 and 2 in group 1 and group 2 → press OK.

32
OUT PUT:

Group Statistics
Group N Mean Std. Deviation Std. Error
Mean

1.00 5 24.6000 2.30217 1.02956


Nicotics
2.00 6 29.0000 4.64758 1.89737

Independent Samples Test

Levene's Test for t-test for Equality of Means


Equality of
Variances
F Sig. t df Sig. Mean Std. 95% Confidence
(2- Differe Error Interval of the
tailed) nce Differe Difference
nce
Lower Upper

Equal - - -
2.2942
variances 1.386 .269 1.91 9 .087 4.4000 9.5900 .79001
Nic 8
assumed 8 0 1
otic
Equal - - -
s 7.55 2.1587
variances not 2.03 .078 4.4000 9.4290 .62901
9 0
assumed 8 0 1

CONCLUSION :-
The independent two – sample t-test revealed that there is difference in the mean nicotine content between sample A
and sample B ( p- value =0.269 ) . this suggests that significantly different.

33
EXPERIMENT :- 11
Calculate the correlation coefficient for the following (X) and (Y) .
X 48 33 40 9 16 16 65 24 16 57
Y 13 13 24 6 15 4 20 9 6 16

34
AIM OF THE EXPERIMENT :-
To calculate the pearson correlation coefficient between two variables , X and Y, to determine the strength
and direction of their linear relationship.

THEORY:-
The Pearson correlation coefficient (r) is calculated using the formula:
𝑛(∑ 𝑋𝑌) − (∑ 𝑋)(∑ 𝑌)
𝑟=
√[𝑛 ∑ 𝑋 2 − (∑ 𝑋)2 ][𝑛 ∑ 𝑌 2 − (∑ 𝑌)2 ]

Where :
• X and Y are the two variables.
• n is the number of data points ( here n = 10).
• ∑ 𝑋𝑌 is the sum of the products of X and Y .
• ∑ 𝑋 and ∑ 𝑌 are the sums of the individual variables.
• ∑ 𝑋 2 and ∑ 𝑌 2 are the sums of the squares of X and Y , respectively.

STEPS:-
1. In the variable view, define two variables: X and Y.
2. Go to data view tab → enter data.
3. Go to analyses → select correlate → select bivariate → move X and Y to variable tab → click
on person correlation coefficient → click on two tailed test of significance → press OK.

OUT PUT:-

Correlations
X Y

Pearson Correlation 1 .719*


X
Sig. (2-tailed) .019
N 10 10

Pearson Correlation .719* 1


Y
Sig. (2-tailed) .019
N 10 10
*. Correlation is significant at the 0.05 level (2-tailed).

35
CONCLUSION :-
The pearson correlation coefficient between X and Y is approximately 0.719, indicating a strong positive
linear relationship between the two variables. This means that as the values of X increase, the values of Y
tend to increase as well. The correlation is statistically significant with a p-value of 0.019 , meaning the
relationship is unlikely to have occurred by chance.

36
EXPERIMENT:-12
Calculate the regression for the following hight (in cm) of the father (X) and their son (Y).
X 65 66 67 67 68 69 70 72
Y 67 68 65 68 72 72 72 69

37
AIM OF THE EXPERIMENT:-
To calculate the regression for the following hight (in cm) of the father (X) and their son (Y).

THEORY:-
The formula for the slope (b) and intercept (a) is as follows:
𝑛(∑ 𝑋𝑌) − (∑ 𝑋)(∑ 𝑌)
𝑏= 2
𝑛(∑ 𝑋 2 ) − (∑ 𝑋)
∑ 𝑌 − 𝑏(∑ 𝑋)
𝑎=
𝑛
Where :

• n = number of data points.


• ∑ 𝑋, ∑ 𝑌 , ∑ 𝑋𝑌, ∑ 𝑋 2 , ∑ 𝑌 2 are the sums of the data points and their squares/products.

STEPS:-
1. Go to variable view .
2. Enter the variable X and Y.
3. Go to data view.
4. Enter the values of the X and Y.
5. Go to analyze → regression → choose linear → then move the variable X and Y ( for X on Y move
Y to dependent variable & X to independent variable ) → select OK

OUT PUT:-

Variables Entered/Removeda
Model Variables Variables Method
Entered Removed

1 Xb . Enter
a. Dependent Variable: Y
b. All requested variables entered.

38
Model Summaryb
Mode R R Adjusted R Std. Error of Change Statistics
l Square Square the Estimate R Square F df1 df2 Sig. F
Change Change Change

1 .524a .275 .154 2.43004 .275 2.277 1 6 .182


a. Predictors: (Constant), X

b. Dependent Variable: Y

ANOVAa
Model Sum of df Mean F Sig.
Squares Square
Regression 13.444 1 13.444 2.277 .182b
1 Residual 35.431 6 5.905
Total 48.875 7
a. Dependent Variable: Y
b. Predictors: (Constant), X

Coefficientsa
Model Unstandardized Standardized t Sig.
Coefficients Coefficients
B Std. Error Beta
(Constant
27.569 27.554 1.001 .356
1 )
X .611 .405 .524 1.509 .182
a. Dependent Variable: Y

Residuals Statisticsa
Minimu Maximu Mean Std. N
m m Deviation
Predicted Value 67.2917 71.5694 69.1250 1.38587 8
Residual -3.51389 2.87500 .00000 2.24978 8
Std. Predicted
-1.323 1.764 .000 1.000 8
Value
Std. Residual -1.446 1.183 .000 .926 8
a. Dependent Variable: Y

39
CONCLUSION:-
Y = a + bX
For the given data , the equation is :
Y = 27.569 + 0.611X

• Slope (b) = 0.611


• Intercept (a) = 27.569
For every 1 cm increase 1 cm increase in the father’s height , the son’s height is expected to increase
by 0.611 cm. the regression model is statistically significant with a p-value much less than 0.05 ,
meaning the father’s hight has a significant effect on the son’s hight .

40
EXPERIMENT :- 13
TOPIC- TESTING OF HYPOTHESIS
Certain pesticides are packed into bags by a machine. A random sample of 10 boys is drawn and their contains are
found to weight (in kg) as follows.

50 49 52 44 45 48 46 45 49 45

Test if the any packaging can be taken to be 50 kg.

41
AIM OF THE EXPERIMENT:-
To solve the given problem of testing of hypothesis i.e. Certain pesticides are packed into bags by a
machine. A random sample of 10 boys is drawn and their contains are found to weight (in kg) of given data
.

ANSWER:-
Let
H0 : µ = 50
H1 : µ ≠ 50

FORMULA:
ȳ−µ
𝒕𝒏−𝟏 =
𝒔/√𝒏

𝟏
Where 𝑺 = ∑ √𝒏−𝟏 ∑(𝒚 − ȳ) 𝟐

if P < 0.05 reject the null hypothesis.


If P > 0.05 accept the null hypothesis.

STEPS :-
Go to analyze tab → Click compare means, means → Choose one sample T – test → Then move X to the
test variables box → insert test value as 50 → Click OK.

OUTPUT:-

One-Sample Statistics
N Mean Std. Std. Error
Deviation Mean
X 9 47.5556 2.69774 .89925

42
One-Sample Test
Test Value = 50
t df Sig. (2- Mean 95% Confidence Interval of
tailed) Difference the Difference
Lower Upper
X -2.718 8 .026 -2.44444 -4.5181 -.3708

CONCLUSION:-
Here the P value is P = 0.11 which is > 0.05 , so we accept the null hypotheses and we can conclude that
the packaging of pesticides can e taken to 50 kg.

43
EXPERIMENT :-14
Two sets of ten students at random from a college were taken ; one was given memory test as they were
and the other set was given the memory test after two weeks training and the scores were as given below:
Set A 10 8 7 9 8 10 9 6 7 8
Set B 12 8 8 10 8 11 9 8 9 9

Do you think there is any significant effect due to training ? Null and alternative hypothesis should be stated
( given t = 2.10 at d.f. 18 , a = 0.05)

44
AIM OF THE EXPERIMENT :-
To solve the given question .

FORMULA:-
H0 : µ1 = µ2
H1 : µ1 ≠ µ2

STEPS :-
1. Enter set A and set B .
2. Go to data view.
3. Enter the value of the set A and set B .
4. Go to analyze → select compare means → select paired – sample T Test → move the
variables Set A and Set B to variable 1 and variable 2.
5. Press OK.

OUT PUT :-

Paired Samples Statistics


Mean N Std. Std. Error
Deviation Mean
A 8.2000 10 1.31656 .41633
Pair 1
B 9.2000 10 1.39841 .44222

Paired Samples Correlations


N Correlatio Sig.
n
A &
Pair 1 10 .821 .004
B

45
Paired Samples Test
Paired Differences t df Sig. (2-
Mean Std. Std. Error 95% Confidence tailed)
Deviation Mean Interval of the
Difference
Lower Upper
-
Pair A -
1.000 .81650 .25820 -1.58409 -.41591 -3.873 9 .004
1 B
00

46
EXPERIMENT :-15
Suppose that in a public opinion survey answer to the questions
(a) Do you drink
(b) Are you in favour of local opinion on sale of liquor ?
Can you infer the opinion on sale of local option is dependent or not an individual drinks?

Que A

yes no
Que B Yes 56 31
no 18 6

47
AIM OF THE EXPERIMENT :-
To calculate the given problem .

HYPOTHESIS :-
H0 : QueA and QueB are independent .
H1 : QueA and QueB are dependent

FORMULA:-
X2 = ∑( f0 - fe)/fe
Degree of freedom (df) = (r-1)(c-1)

STEPS:-
• Go to variable view .
• Enter QueA, QueB & freq .
• Go to data view.
• Enter the values for the variable.
• Go to data → weight cases → select weight cases by → move freq. to right hand side → press OK
• Go to analyze → descriptive statistics → select crosstabs → move QueA to column(s) and QueB to
row (s) → select statistics and chose chi square → press continue → click OK.

48
OUTPUT:-
Case Processing Summary
Cases
Valid Missing Total
N Percent N Percent N Percent
QueB *
111 100.0% 0 0.0% 111 100.0%
QueA

QueB * QueA Crosstabulation


Count
QueA Total
no Yes
no 6 18 24
QueB
yes 31 56 87
Total 37 74 111

Chi-Square Tests
Value df Asymp. Sig. Exact Sig. (2- Exact Sig. (1-
(2-sided) sided) sided)
Pearson Chi-Square .957a 1 .328
Continuity
.538 1 .463
Correctionb
Likelihood Ratio .993 1 .319
Fisher's Exact Test .464 .234
N of Valid Cases 111
a. 0 cells (0.0%) have expected count less than 5. The minimum expected count is 8.00.
b. Computed only for a 2x2 table

CONCLUSION:-
Df = (2 – 1)(2-1) = 1
X2 calculated = 0.957
Here p value (0.328) is greater than 0.05 . So we accept the null hypothesis and conclude that the opinion
on local option independent to each other.

49
EXPERIMENT:- 16
Seven coins are tossed and number of heads noted. The experiment is repeated 128 times and the following
distribution is obtained:
No of 0 1 2 3 4 5 6 7 Total
heads:

Frequency 7 6 19 35 30 23 7 1 128

Fit a binomial distribution assuming


i. The coin is unbiased.
ii. The nature of the coin is not known
iii. Probability of a head for four coin is 0.5 and for the remaining three coins is 0.45.

50
AIM OF THE EXPERIMENT :-
To fit a binomial distribution .

THEORY :-
A discrete random variable x is said to follow a binomial distribution . if it assumes only non negative
values and its probability mass function is given by
𝑛
𝑌 𝑥 𝑝 𝑥 𝑞 𝑛−𝑥 ; 𝑥 = 0,1,2, … , 𝑛 𝑞 = 1 − 𝑝
𝑝(𝑋, 𝑥) = 𝑝(𝑥) = 𝑓(𝑥) = {
0, 𝑜𝑡ℎ𝑒𝑟 𝑤𝑖𝑠𝑒

𝑛
𝑝(𝑥 + 1) = 𝐶 𝑝 𝑥+1 𝑞 𝑛−𝑥−1
𝑥+1

𝑛
𝑝(𝑥 + 1) 𝐶 𝑥+1 𝑝(𝑚+1) 𝑞 𝑛−𝑥−1
= 𝑛 .
𝑝(𝑥) 𝐶𝑥 𝑝 𝑥 𝑞 𝑛−𝑥

𝑝(𝑥 + 1) 𝑛−𝑥 𝑝
=
𝑝(𝑥) 𝑥+1 𝑞

Hence the recurrence formula is


𝑛−𝑥 𝑝
𝑝(𝑥 + 1) = . . 𝑝(𝑥)
𝑥+1 𝑞

TABULATION :-
No of heads(x) frequency (f)
0 7
1 6
2 19
3 35
4 30
5 23
6 7
7 1
Total 128

51
CALCULATION :-
1 𝑝
Case – 1: When a coin is unbiased: p = q = 2 , 𝑞 = 1

1 7
𝑛
1
𝑝(0) = 𝑞 = ( ) =
2 128
1
So that 𝑓(0) = 𝑁𝑞 𝑛 = 128(2)𝑛 = 1

TABULATION :- 2

(n-x)p expected frequency


x F fn n-x/x+1
/(x+1)q f(x) - Np(x)

0
0 7 7 7 f(0) = Np(0) = 1
f(1) =Np(1)= 1*7 =
6
1 6 3 3 7

38 5 5
2 19 3 3 f(2) = 7*3= 21
105
3 35 1 1 f(3) = 21*5/3 = 35
120
4 30 3/5 3/5 f(4) = 35*1 = 35
115
5 23 1/3 1/3 f(5)= 35*3/5 = 21
42
6 7 1/7 1/7 f(6)= 21*1/3 = 7
7
7 1 f(7) = 7*1/7 = 1
Total 128 433

Case 2:-
When the nature of the coin is not known, then
1 433
Mean = np = 𝑥̅ = ∑𝑁
𝑖=1 𝑓𝑖 𝑥𝑖 = = 3.3828
𝑁 128
3.3828
Where n=7 , p = = 0.483259
7
And q = 1-p = 0.516741
𝑝
= 0.935205184
𝑞

f(0)=Nqn = 128( 0.516741)7 = 1.25927575

52
expected frequency
x (n-x)/(x+1) (n-x)/(x+1)*p/q f(x) = Np(x)
0 7 6.54643629 1.25927453
1 3 2.80561555 8.24376282
2 1 2/3 1.55867531 23.12883579
3 1 0.93520518 36.05035552
4 3/5 0.56112311 33.71448899
5 1/3 0.31173506 18.91798433
6 1/7 0.13360074 5.89740069
7 0 0.78789732

Case 3:-
The probability generating function (p.g.f) say Px(s) for the 4 coin and Py(s) for the remaining 3 coins are
given by
Px(s) ( 0.50 + 0.50s)4 , Py(s) = (0.55 + 0.45s)3
Since all the throws are independent , the pgf Px+y(s) for the whole experiment is given by :
Px+y (s) = Px(s)Py(s)
= (0.50+0.50s )4 × (0.55+0.45s)3
= (0.0625 +0.25s + 0.375s2 + 0.25s3 + 0.0625s4)
× (0.16637s+0.708375s+0.334125s2 + 0.091125s3)

f(x) = N × coefficient of s2 in Px+y (s)


f(0) = 128 × 0.625 × 0.16637=1.13310
f(1) = 128 × (0.25×0.16637s + 0.40837s × 0.625) = 0.85410
f(2) = 128 × (0.28396) = 36.3470
f(3) = 128 × (0.184117) = 23.5669
f(4) = 128 × (0.26057) = 33.3529
f(5) = 128 × (0.14602) = 18.6934
f(6) = 128 × (0.04366) = 5.5889
f(7) = 128 × (0.005695) = 0.72896

CONCLUSION :-
these frequencies rounded to the nearest integer, keeping in mind that total frequency N=128 , are given
below:

x 0 1 2 3 4 5 6 7 total
f 1 9 36 23 33 19 6 1 N=128

53
EXPERIMENT :- 17
Fit a Poisson distribution to the following data which gives the number of doddens in a sample of clover
seeds.
No of 0 1 2 3 4 5 6 7 8
doddens
(n)
Observed 56 156 132 92 37 22 4 0 1
frequency

54
AIM OF THE EXPERIMENT :-
To fit the Poisson distribution .

THEORY :-
A discreate random variable x is said to follow a Poisson distribution if it assumes only a negative restriction value
and its probability mass function is given

𝑒 −𝜆 𝜆𝑥
𝑃(𝑋 = 𝑥) = 𝑃(𝑥) = { 𝑥! ; 𝑥 = 0,1,2, … , 𝑛
0 ; 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

Where 𝜆 is the parameter of the Poisson distribution thus we get X ~ P(𝜆) .


𝑒 −𝜆 𝜆𝑥
Now P(x) =
𝑥!

𝑒 −𝜆 𝜆𝑥+1
P(x+1) =
(𝑥+1)!

𝑒 −𝜆 𝜆𝑥+1
𝑃(𝑥 + 1) (𝑥 + 1)! 𝜆
= −𝜆 𝑥 =
𝑃(𝑥) 𝑒 𝜆 𝑥+1
(𝑥)!
𝜆
P(x+1) = (𝑥+1) 𝑃(𝑥)

Which is the required recurrence formula


𝜆
Thus f(x) = P(x+1) = (𝑥+1) 𝑃(𝑥)

55
TABULATION :-

No of doddens Obesrved frequency Cummulation


(x) (f) frequency fx
0 56 56 0
1 156 212 156
2 132 344 264
3 92 436 276
4 37 473 148
5 22 495 110
6 4 499 24
7 0 499 0
8 1 500 8
Total 500

CALCULATION:-
1 986
Mean = 𝑁 ∑ 𝑓𝑥 = 500 = 1.972

Taking the mean of the given distribution as the mean of the Poisson distribution , we want to fit , we get
𝜆 = 1.972
𝑒 −𝜆 𝜆𝑥
And P(x) = , x = 0,1,2,…,∞
𝑥!

P(0) = 𝑒 −𝜆 = 𝑒 −1.972
So that log P(0) = log 𝑒 −1.972
= -1.972 log10 𝑒
= -1.972 × 0.43492
= -0.85766224
=1̅. 143581
P(0) = antilog (1̅. 143581) = 0.1342

56
Expected
𝝀 Frequency
X (𝒙 + 𝟏) P(x) N.P(X)=500P(X)
69.605 ~70
0 1.472 0.13921
137.275 ~137
1 0.986 0.27455
135.03 ~135
2 0.657 0.27006
88.965 ~ 89
3 0.493 0.17793
54.82 ~55
4 0.394 0.10964

5 0.281 0.10964 54.82 ~55


19.7295 ~20
6 0.247 0.039459
5.685 ~6
7 0.328 0.01137
0.39 ~0
8 0.219 0.00078

Total = 566

CONCLUSION :-
Hence the Poisson distribution is useful in rare events where the probability of success “p” is very small
and probability of failure (q) is very large and value of n is vary large .

57

You might also like