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

Probablity lab

probablity lab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Probablity lab

probablity lab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 47

DELHI TECHNOLOGICAL

UNIVERSITY

MC205 – PROBABILITY AND STATISTICS


PRACTICAL FILE

Submitted By:- Submitted To:-

Ayaan Mozahir Ms Kirti Rani

2K22/CO/117 Mr Lokesh Chander


Date

Experiment - 0
Introduction to SPSS:
SPSS is a Windows based program that can be used to perform data entry and analysis and to create tables
and graphs. SPSS is capable of handling large amounts of data and can perform all of the analyses covered
in the text and much more. SPSS is commonly used in the Social Sciences and in the business world, so
familiarity with this program should serve you well in the future. SPSS is updated often

Main screen of SPSS:

Experiment - 1
Objective: Transportation of data set to SPSS data editor

INPUT:
car_sales.xlsx

PROCEDURE:
1.) File > read text data.
2.) Choose type of file as excel.

OUTPUT:
INITIAL VIEW
DATA VIEW

VARIABLE VIEW

CONCLUSIONS: Any document file can be transported to SPSS editor window.


Experiment - 2
Objective: By using two files, demonstrating Merging of Data set.

INPUT:
Book1.xlsx & Book2.xlsx

File-1

File-2
PROCEDURE:
(B) Merging of variables:

1.) Open Book2.xlsx.

2.) Data > merge files > variables.

3.) Choose file merged with already opened file Book2.xlsx.

4.) Move the common variables to left.

5.) Check the box saying ‘merge cases on key variables ’

6.) Select the common variables using Ctrl + Click and move them to key variables list.

7.) Choose the radio button saying ‘Both files provide cases’ and click OK.

OUTPUT:
(A) Merging of cases
(B) Merging of variables

CONCLUSIONS: We conclude that in SPSS, two files can be merged either by cases or by
variables.
Experiment - 3
Objective: Pictorial representation of data.

PROCEDURE:
1.) Graphs > chart builder.
2.) Select and drag the type of graph from gallery.
3.) Select and drag variables according to chart preview.
4.) Click on element properties.
5.) Edit any properties, if required.
6.) Pres OK and graph is opened in output window.
7.) Do same for pie chart.

OUTPUT:
LINE GRAPH
BAR GRAPH

PIE CHART:

CONCLUSION: We conclude that for any set of data, we can represent it easily with the help
of graphs.
Experiment - 4
Objective: Drawing of Histogram and distribution curve

OUTPUT:
DESCRIPTIVES VARIABLES=price

/STATISTICS=MEAN STDDEV VARIANCE MIN MAX SKEWNESS.

Descriptives
Notes

Output Created 12-SEP-2023 10:30:39

Comments

C:\Program

Files\IBM\SPSS\Statistics\21\Samples\
Data
English\car_sales.sav

DataSet1
Active Dataset
Input <none>
Filter

<none>
Weight

<none>
Split File
157
N of Rows in Working Data
File

User defined missing values are treated


Definition of Missing
as missing.
Missing Value Handling

Cases Used All non-missing data are used.

DESCRIPTIVES VARIABLES=price
Syntax
/STATISTICS=MEAN STDDEV
VARIANCE MIN MAX SKEWNESS.

00:00:00.00
Resources Processor Time

00:00:00.00
Elapsed Time
[DataSet1] C:\Program Files\IBM\SPSS\Statistics\21\Samples\English\car_sales.sav

Descriptive Statistics
N Minimum Maximum Mean Std. Deviation Variance

Statistic Statistic Statistic Statistic Statistic Statistic

Price in thousands 155 9.235 85.500 27.39075 14.351653 205.970

Valid N (listwise) 155

Descriptive Statistics
Skewness

Statistic Std. Error

Price in thousands 1.766 .195

Valid N (listwise)

FREQUENCIES VARIABLES=price

/STATISTICS=STDDEV MEAN MEDIAN MODE SUM SKEWNESS SESKEW

/HISTOGRAM

/ORDER=ANALYSIS.

Frequencies
Notes
Output Created
12-SEP-2023 10:31:12

Comments

C:\Program
Files\IBM\SPSS\Statistics\21\Samples\
Data English\car_sales.sav

DataSet1
Input
Active Dataset
Filter <none>

Weight <none>

Split File <none>

157
N of Rows in Working Data
File

Definition of Missing User-defined missing values are treated


as missing.

Missing Value Handling


Cases Used Statistics are based on all cases with
valid data.

FREQUENCIES VARIABLES=price

/STATISTICS=STDDEV MEAN
MEDIAN MODE SUM SKEWNESS
SESKEW

Syntax /HISTOGRAM

/ORDER=ANALYSIS.

00:00:00.66
Processor Time

00:00:00.83
Resources Elapsed Time
[DataSet1] C:\Program Files\IBM\SPSS\Statistics\21\Samples\English\car_sales.sav

Statistics

Price in thousands

Valid 155
N
Missing 2

Mean 27.39075

Median 22.79900

Mode 12.640a

Std. Deviation
14.351653
1.766
Skewness

Std. Error of Skewness .195

Sum 4245.567

a. Multiple modes exist. The smallest value


is shown
SORT CASES BY manufact.

SPLIT FILE SEPARATE BY manufact.

SORT CASES BY type.

SPLIT FILE SEPARATE BY type.

Conclusion: The Data set of Car sales from repository is used, and frequency table is created. Then the
Histogram and frequency curve of Horse power of engine variable is successfully drawn. Discuss about class
interval and the information revealed by frequency table, histogram and frequency curve

Experiment - 5
Objective: Descriptive statistics

PROCEDURE:
(A) Descriptive Statistics
1.) Analyze > descriptive statistics > frequencies.
2.) Send variables to be used over the list called ‘Variables’ o the right side.
3.) Click statistics and choose the required options to be displayed. Click on CONTINUE.
4.) Click on charts and select HISTOGRAM.
5.) Click OK.

(B) Visual binning


1.) Transform > visual binning.
2.) Send the variables to be used over the list called ‘Variables’ on the right side. Click on
continue.
3.) Name the binned variable.
4.) Click on ‘Make Cutpoints’ and choose required mode and fill cutpoints information.
5.) Click on APPLY and then OK.
6.) Plot histogram of binned variable.

OUTPUT:

Descriptive Statistics

GET
FILE='C:\Program
Files\IBM\SPSS\Statistics\21\Samples\English\Employee data.sav'.
DATASET NAME DataSet1
WINDOW=FRONT. FREQUENCIES
VARIABLES=salary
/STATISTICS=STDDEV VARIANCE MEAN MEDIAN MODE
/HISTOGRAM
/ORDER=ANALYSIS.

Frequencies

Notes

Output Created 09-SEP-2024 11:03:40


Comments
Input Data C:\Program
Files\IBM\SPSS\Statistics\2
1\Sample s\English\
Active Dataset
Employee
File Label
data.sav
Filter
Weight DataS
Split File N et1
of Rows in
Working 05.00.
Data File 00
Missing Value
Handling Definition of Missing <none>
<none>
Cases Used <none>
Syntax
474

User-defined missing values


Resources are treated as missing.
Processor Time Statistics are based on all
Elapsed Time cases with valid data.
FREQUENCIES
VARIABLES=salary
/STATISTICS=STDDE
V VARIANCE MEAN
MEDIAN MODE
/HISTOGRAM
/ORDER=ANALYSIS.
00:00:00.
78
00:00:00.
72
[DataSet1] C:\Program
Files\IBM\SPSS\Statistics\21\Samples\English\Employe e data.sav

Statistics

Current Salary
N Valid 474
Missing 0
Mean $34,419.5
7
Median $28,875.0
0
Mode $30,750
Std. Deviation $17,075.6
61
Variance 29157821
4.5
DESCRIPTIVES VARIABLES=prevexp
/STATISTICS=MEAN STDDEV VARIANCE RANGE MIN MAX.

Descriptives

Output Created 12-SEP-2023 11:04:16


Comments
Input Data C:\Program
Files\IBM\SPSS\Statistics\2
1\Sample s\English\
Active Dataset
Employee
File Label
data.sav DataS
Filter
Weight et1 05.00.
Split File N 00
of Rows in
<none>
Working
Data File <none>
Missing Value <none>
Handling Definition of Missing
474
Syntax Cases Used
User defined missing
values are treated as
Resources missing.
Processor Time All non-missing data are
Elapsed Time
used.
DESCRIPTIVES
VARIABLES=prevexp
/STATISTICS=MEAN
STDDEV VARIANCE
RANGE MIN MAX.
00:00:00.
00
00:00:00.
00

[DataSet1] C:\Program Files\IBM\SPSS\Statistics\21\Samples\English\Employe e


data.savDescriptive Statistics
N Range Minimu Maximu Mean Std.
m m Deviation
Previous 474 476 0 476 104.586
Experience 95.8
(months) 6
Valid N (listwise) 474

Descriptive Statistics
Variance
Previous Experience (months) 10938.281
Valid N (listwise)

SORT CASES BY jobcat.


SPLIT FILE SEPARATE BY
jobcat. DESCRIPTIVES
VARIABLES=prevexp
/STATISTICS=MEAN STDDEV VARIANCE RANGE MIN MAX.

Descriptives

Output Created 12-SEP-2023 11:05:07


Comments
Input Data C:\Program
Files\IBM\SPSS\Statistics\21\Sa
Active Dataset mple s\English\Employee
File Label data.sav DataSet1
Filter 05.00.00
Weight <none>
Split File <none>
Missing Value N of Rows in Working Employment Category
Handling Data File
Definition of Missing 474
Syntax
User defined missing values
Cases Used
are treated as missing. All
Resources non-missing data are used.
DESCRIPTIVES
Processor Time VARIABLES=prevexp
Elapsed Time /STATISTICS=MEAN
STDDEV VARIANCE RANGE
MIN MAX.
00:00:00.00
00:00:00.00

[DataSet1] C:\Program
Files\IBM\SPSS\Statistics\21\Samples\English\Employe e data.sav

Employment Category = Clerical

a
Descriptive Statistics
N Range Minimu Maximu Mean Std.
m m Deviation
Previous 363 476 0 476 95.275
Experience 85.0
(months) 4
Valid N (listwise) 363
a
Descriptive Statistics

Variance
Previous Experience 9077.258
(months)
Valid N (listwise)
a. Employment Category = Clerical

Employment Category = Custodial

a
Descriptive Statistics

N Range Minimu Maximu Mean Std.


m m Deviation
Previous 27 316 144 460 101.426
Experience 298.1
(months) 1
Valid N (listwise) 27
a
Descriptive Statistics

Variance
Previous Experience 10287.333
(months)
Valid N (listwise)
a. Employment Category = Custodial

Employment Category = Manager

a
Descriptive Statistics

N Range Minimu Maximu Mean Std.


m m Deviation
Previous 84 282 3 285 73.260
Experience 77.6
(months) 2
Valid N (listwise) 84
a
Descriptive Statistics

Variance
Previous Experience 5367.010
(months)
Valid N (listwise)
a. Employment Category = Manager

CONCLUSION:
1.) Frequency tables show us the vivid interpretation of data.
2.) Frequency curves show us easy interpretation of skewness and kurtosis curves.
3.) Binning operation gives us an extra variable in case of continuous data.
Experiment - 6
Objective: Correlation of two variables

PROCEDURE:
1.) Analyze > correlate > bivariate.
2.) Select and drag nay variable of your choice.
3.) Select “Two-Tailed” and click OK.

Graph:

1.) Graphs(output window) > chart builder.


2.) Select scatter/dot graph.
3.) Select variables for X and Y axis.
4.) Click OK.

OUTPUT:
CORRELATIONS
/VARIABLES=horsepow mpg
/PRINT=TWOTAIL NOSIG
/STATISTICS DESCRIPTIVES
/MISSING=LISTWISE.

Correlations

Note
s

Output Created 10-OCT-2023 10:27:45


Comments
Input Data C:\Program
Files\IBM\SPSS\Statistics\2
1\Sample
Active Dataset
s\English\car_sales.sav
Filter
DataSet1
Weight
<none>
Split File
N of Rows in <none>
Working <none>
Data File
Missing Value Definition of
157
Handling Missing
Cases Used User-defined missing
values are treated as
missing.
Syntax
Statistics are based on
cases with no missing data
for any variable used.
Resources Processor Time CORRELATIONS
Elapsed Time /VARIABLES=horsepow
mpg /PRINT=TWOTAIL
NOSIG
/STATISTICS
DESCRIPTIVES
/MISSING=LISTWISE.
00:00:00
.00
00:00:00
.00

[DataSet1] C:\Program
Files\IBM\SPSS\Statistics\21\Samples\English\car_sal es.sav

Descriptive Statistics

Mea Std. N
n Deviation
Horsepow 185.95 56.700 156
er
Fuel 23.88 4.271 156
efficiency
b
Correlations
Horsepow Fuel
er efficiency
Horsepower Pearson 1 -
Correlation .605
Sig. (2-tailed) **
.00
0
Fuel efficiency Pearson - 1
Correlation .605
Sig. (2-tailed) **
.00 0

**. Correlation is significant at the 0.01 level (2-tailed). b.


Listwise N=156
CORRELATIONS
/VARIABLES=horsepow mpg
/PRINT=TWOTAIL NOSIG
/STATISTICS DESCRIPTIVES /MISSING=PAIRWISE.

Correlations

Note
s

Output Created 10-OCT-2023 10:28:04


Comments
Input Data C:\Program
Files\IBM\SPSS\Statistics\2
1\Sample
Active Dataset
s\English\car_sales.sav
Filter
DataSet1
Weight
<none>
Split File
N of Rows in <none>
Working <none>
Data File
Missing Value
Definition of 157
Handling
Missing
Cases Used User-defined missing
values are treated as
Syntax missing.
Statistics for each pair of
variables are based on all
the cases with valid data
Resources for that pair.
Processor Time CORRELATIONS
Elapsed Time /VARIABLES=horsepow
mpg /PRINT=TWOTAIL
NOSIG
/STATISTICS
DESCRIPTIVES
/MISSING=PAIRWISE.

00:00:00
.00
00:00:00
.00
[DataSet1] C:\Program
Files\IBM\SPSS\Statistics\21\Samples\English\car_sal es.sav

Descriptive Statistics

Mea Std. N
n Deviation
Horsepow 185.95 56.700 156
er
Fuel 23.88 4.271 156
efficiency
Correlations

Horsepow Fuel
er efficiency
Horsepow Pearson 1 **
-.605
er Correlation
Sig. (2-tailed) .000
N 156 156
Fuel Pearson ** 1
-.605
efficiency Correlation
Sig. (2-tailed) .000
N 156 156

**. Correlation is significant at the 0.01 level (2-tailed).

CONCLUSION: From the above data, we conclude that horsepower and fuel efficiency are partially
correlated.
Experiment-7
Objective: Regression

PROCEDURE:
1.) Analyze > regression > curve estimation.
2.) Select engine sizes for dependent variable.
3.) Select sales for independent variable.
4.) Under category ‘Models’, select Linear, Quadratic, Exponential.
5.) Click OK.

OUTPUT:

Part a:
Curve Fit

Notes

Output Created 17-OCT-2023 10:49:12


Comments
Input Data C:\Program Files\IBM\SPSS\Statistics\21\Sample
s\English\car_sales.sav
DataSet1
Active Dataset
<none>
Filter
<none>
Weight
<none>
Split File
N of Rows in Working 157
Data File
Definition of Missing User-defined missing values are treated as
Missing Value Handling
missing.
Cases Used Cases with a missing value in any variable are
not used in the analysis.

Syntax CURVEFIT
/VARIABLES=sales WITH engine_s
/CONSTANT
/MODEL=LINEAR
/PLOT FIT.

Processor Time 00:00:00.11


Resources
Elapsed Time 00:00:00.16
Use From First observation Last observation
To First Observation following the use
From
Predict
period
To
Time Series Settings Amount of Output Last observation PRINT =
(TSET) Saving New Variables DEFAULT NEWVAR = NONE
Maximum Number of
Lags
in Autocorrelation or MXAUTO = 16
Partial Autocorrelation
Plots
Maximum Number of
Lags MXCROSS = 7
Per Cross-Correlation
Plots

Notes

Maximum Number of New Variables Generated Per


Procedure MXNEWVAR = 60

Maximum Number of New Cases Per Procedure


MXPREDICT = 1000
Treatment of User-Missing Values
MISSING = EXCLUDE
Confidence Interval Percentage Value
CIN = 95
Tolerance for Entering Variables in Regression
Equations TOLER = .0001

Maximum Iterative Parameter Change


CNVERGE = .001
Method of Calculating Std. Errors for Autocorrelations
ACFSE = IND

Length of Seasonal Period


Unspecified
Variable Whose Values Label Observations in Plots
Unspecified

Equations Include
CONSTANT
[DataSet1] C:\Program Files\IBM\SPSS\Statistics\21\Samples\English\car_sal
es.sav

Model Description

Model Name MOD_5


Dependent Variable 1 Sales in thousands
Equation 1 Linear
Independent Variable Engine size
Constant Included
Variable Whose Values Label Observations in Plots Unspecified

Case Processing Summary

N
Total Cases 157
Excluded Casesa 1
Forecasted Cases 0
Newly Created Cases 0

a. Cases with a missing value in any variable are excluded from the analysis. Variable
Processing Summary

Variables
Dependent Independent
Sales in
thousands Engine size
Number of Positive Values 157 156
Number of Zeros 0 0
Number of Negative 0 0
Values
Number of Missing Values User-Missing 0 0
System-Missing 0 1

Model Summary and Parameter Estimates

Dependent Variable: Sales in thousands


Model Summary Parameter Estimates
Equation R Square F df1 df2 Sig. Constant b1
Linear .000 .062 1 154 .804 48.999 1.306
CONCLUSION: From above data, we conclude that engine size and sales are partially correlated.
Part b:
REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT sales
/METHOD=ENTER horsepow.

Regression

Notes

Output Created 17-OCT-2023 11:25:04


Comments
Input Data C:\Program
Files\IBM\SPSS\Statistics\21\Sample
s\English\car_sales.sav
Active Dataset DataSet1
Filter <none>
Weight <none>
Split File <none>
N of Rows in Working
Data File 157

Missing Value Handling Definition of Missing


User-defined missing values are
treated as missing.
Cases Used
Statistics are based on cases with no
missing values for any variable used.
Syntax REGRESSION
/MISSING
LISTWISE /STATISTICS COEFF
OUTS R
ANOVA
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT sales
/METHOD=ENTER horsepow.
Resources Processor Time
Elapsed Time 00:00:00.00
Memory Required 00:00:00.03
Additional Memory 1900 bytes
Required for 0 bytes
Residual Plots

[DataSet1] C:\Program Files\IBM\SPSS\Statistics\21\Samples\English\car_sal


es.sav

Variables Entered/Removeda
Variables Variables
Mode Entered Removed Method
l
1 Horsepowerb . Enter
a. Dependent Variable: Sales in thousands
b. All requested variables entered.
Model Summary
Adjusted R Std. Error of
Mode R R Square Square the Estimate
l
1 .198a .039 .033 67.117542

a. Predictors: (Constant),
Horsepower

ANOVAa
Sum of
Model Squares df Mean Square F Sig.

1 Regression 28234.392 1 28234.392 6.268 .013b


Residual 693733.726 154 4504.764
Total 721968.118 155

a. Dependent Variable: Sales in thousands


b. Predictors: (Constant), Horsepower

Coefficientsa
Standardized
Unstandardized Coefficients Coefficients

Model B Std. Error Beta t Sig.


1 (Constant) 97.257 18.478 5.263 .000
Horsepower -.238 .095 -.198 -2.504 .013
a. Dependent Variable: Sales in thousands

REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT sales /METHOD=ENTER
price resale.

Regression
Notes

Output Created 17-OCT-2023 11:25:42


Comments
Input Data C:\Program
Files\IBM\SPSS\Statistics\21\Sample
s\English\car_sales.sav
Active Dataset DataSet1
Filter <none>
Weight <none>
Split File <none>
N of Rows in Working
Data File 157

Missing Value Handling Definition of Missing


User-defined missing values are
treated as missing.
Cases Used
Statistics are based on cases with no
missing values for any variable used.
Syntax REGRESSION
/MISSING
LISTWISE /STATISTICS COEFF
OUTS R
ANOVA
/CRITERIA=PIN(.05) POUT(.10)
/NOORIGIN
/DEPENDENT sales
/METHOD=ENTER price resale.
Resources Processor Time
Elapsed Time 00:00:00.00
Memory Required 00:00:00.02
Additional Memory 2156 bytes
Required for 0 bytes
Residual Plots

Variables Entered/Removeda
Variables Variables
Mode Entered Removed Method
l
1 4-year resale
value, Price in . Enter
thousandsb
a. Dependent Variable: Sales in thousands
b. All requested variables entered.
Model Summary
Adjusted R Std. Error of
Mode R R Square Square the Estimate
l
1 .281a .079 .063 72.176890

a. Predictors: (Constant), 4-year resale value, Price in thousands


ANOVAa
Sum of
Model Squares df Mean Square F Sig.

1 Regression 51921.441 2 25960.721 4.983 .008b


Residual 604302.399 116 5209.503
Total 656223.840 118
a. Dependent Variable: Sales in thousands
b. Predictors: (Constant), 4-year resale value, Price in thousands

Coefficientsa
Standardized
Unstandardized Coefficients Coefficients

Model B Std. Error Beta t Sig.


1 (Constant) 88.655 14.604 6.070 .000
Price in thousands .581 1.565 .110 .371 .711
4-year resale value -2.482 1.916 -.384 -1.295 .198
a. Dependent Variable: Sales in thousands

CONCLUSION: From above data, we analyse the regression of given data set.
Experiment-8
Objective: Hypothesis Testing ‘t’ – test
Procedure:
1. Open SPSS and load your data.

2. Choose the t-test type:

 One-Sample t-test: Analyze > Compare Means > One-Sample T Test. Select the test variable and set
the population mean.

 Independent-Samples t-test: Analyze > Compare Means > Independent-Samples T Test. Select the
test variable and grouping variable, then define groups.

 Paired-Samples t-test: Analyze > Compare Means > Paired-Samples T Test. Select the paired
variables.

3. Run the Test by clicking OK.

4. Interpret Results:

 Check the p-value: If p < 0.05, the difference is significant.

 Review means and confidence intervals for context on the difference size.

OUTPUT: T-TEST
/TESTVAL=17.4

/MISSING=ANALYSIS

/VARIABLES=fuel_cap

/CRITERIA=CI(.95).

T-Test
Notes

Output Created 31-OCT-2023 11:00:15

Comments

C:\Program
Files\IBM\SPSS\Statistics\21\Samples\

Data English\car_sales.sav

DataSet1

Active Dataset
<none>
Input
Filter
Weight <none>

Split File <none>


N of Rows in Working Data
157
File

Definition of Missing User defined missing values are

treated as missing.
Missing Value Handling

Statistics for each analysis are based


on the cases with no missing or out-
ofrange data for any variable in the
analysis.
Cases Used

T-TEST

/TESTVAL=17.4

/MISSING=ANALYSIS

/VARIABLES=fuel_cap
Syntax

/CRITERIA=CI(.95).

00:00:00.00
Processor Time

00:00:00.00
Resources Elapsed Time
One-Sample Statistics

N Mean Std. Deviation Std. Error Mean

Fuel capacity 156 17.952 3.8879 .3113

One-Sample Test

Test Value = 17.4

t df Sig. (2-tailed) Mean Difference


95% Confidence
Interval of the
Difference

Lower

Fuel capacity 1.773 155 .078 .5519 -.063

One-Sample Test

Test Value = 17.4


95% Confidence Interval of the Difference

Upper

Fuel capacity 1.167

T-Test
Notes
Output Created 31-OCT-2023 11:00:44

Comments

C:\Program
Files\IBM\SPSS\Statistics\21\Sam
Data
ples\English\car_sales.sav

DataSet1
Active Dataset
Input <none>
Filter

Weight <none>

Split File <none>

N of Rows in Working Data File 157

Definition of Missing
User defined missing values are
treated as missing.

Statistics for each analysis are


Cases Used based on the cases with no
missing or out-of-range data for
any variable in the analysis.
Missing Value Handling

T-TEST GROUPS=type(0 1)

/MISSING=ANALYSIS
Syntax

/VARIABLES=length
/CRITERIA=CI(.95).

Processor Time 00:00:00.02


Resources
Elapsed Time 00:00:00.03

Group Statistics

Vehicle type N Mean Std. Deviation Std. Error Mean


Automobile 116 186.280 12.7858 1.1871
Length
Truck 40 190.428 14.8949 2.3551

Independent Samples Test


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

F Sig. t df

.369 -1.694 154


Equal variances assumed .813

Length -1.573 60.023


Equal variances not
assumed

Independent Samples Test

t-test for Equality of Means

Sig. (2-tailed) Mean Std. Error


Difference 95%
Difference
Confidence
Interval of the
Difference

Lower

Equal variances assumed .092 -4.1473 2.4481 -8.9836

Length .121 -4.1473 2.6374 -9.4228


Equal variances not
assumed

Independent Samples Test

t-test for Equality of Means

95% Confidence Interval of the


Difference

Upper

Equal variances assumed .6889


Length
Equal variances not assumed 1.1282

T-TEST PAIRS=sales WITH mpg (PAIRED)

/CRITERIA=CI(.9500)

/MISSING=ANALYSIS.
T-Test
Notes

Output Created 31-OCT-2023 11:01:30


Comments

C:\Program
Files\IBM\SPSS\Statistics\21\Samples\
Data English\car_sales.sav

DataSet1
Active Dataset
<none>
Input
Filter

<none>
Weight
Split File
<none>
N of Rows in Working Data 157
File

Definition of Missing User defined missing values are

treated as missing.

Statistics for each analysis are based


Cases Used
on the cases with no missing or out-
ofrange data for any variable in the
analysis.
Missing Value Handling

T-TEST PAIRS=sales WITH mpg


(PAIRED)
Syntax
/CRITERIA=CI(.9500)

/MISSING=ANALYSIS.

Processor Time 00:00:00.00

Resources Elapsed Time 00:00:00.00

[DataSet1] C:\Program Files\IBM\SPSS\Statistics\21\Samples\English\car_sales.sav

Paired Samples Statistics

Mean N Std. Deviation Std. Error Mean

Sales in thousands 52.86127 154 68.624655 5.529932


Pair 1
Fuel efficiency 23.84 154 4.283 .345
Paired Samples Correlations

N Correlation Sig.

154 -.017 .837


Sales in thousands & Fuel
Pair 1
efficiency

Paired Samples Test

Paired Differences

Mean Std. Deviation Std. Error Mean


95% Confidence
Interval of the
Difference

Lower

29.017766 68.829425 5.546433 18.060287


Sales in thousands - Fuel
Pair 1
efficiency

Paired Samples Test


t df Sig. (2-tailed)
Paired Differences

95% Confidence
Interval of the
Difference

Upper

39.975246 5.232 153 .000


Sales in thousands - Fuel
Pair 1
efficiency

CONCLUSION:
T Test formula:

We obtain that as we increase the test value, mean difference increases. It means that more approximately
we estimate the better result we get.
Experiment-9
Objective: Chi-square test

Procedure:
1. Open SPSS and load your data.
2. Choose Chi-Square Test:
o Go to Analyze > Descriptive Statistics > Crosstabs…
3. Set Variables:
o Select the row and column variables (categorical variables you want to test).
o Click Statistics…, check Chi-square, and then click Continue.
4. Run the Test by clicking OK.
5. Interpret Results:
o In the output, find the Chi-Square Tests table.
o Check the p-value for the Chi-Square statistic: If p < 0.05, there’s a significant association
between variables.

OUTPUT:
CROSSTABS

/TABLES=fraudulent BY gender

/FORMAT=AVALUE TABLES
/STATISTICS=CHISQ

/CELLS=COUNT

/COUNT ROUND CELL. Crosstabs

Notes

Output Created 31-OCT-2023 11:16:23

Comments

C:\Program
Files\IBM\SPSS\Statistics\21\Sampl

Data es\English\insurance_claims.sav

DataSet1

Active Dataset
Insurance Claims

Input File Label


Filter <none>

Weight <none>

Split File <none>

N of Rows in Working
Data File 4415

User-defined missing values are


Definition of Missing
treated as missing.

Statistics for each table are based

Cases Used on all the cases with valid data in the


specified range(s) for all variables in
each table.
Missing Value Handling

CROSSTABS

/TABLES=fraudulent BY gender

/FORMAT=AVALUE TABLES
Syntax
/STATISTICS=CHISQ

/CELLS=COUNT

/COUNT ROUND CELL.

Processor Time 00:00:00.02

Elapsed Time 00:00:00.02


Resources
2
Dimensions Requested

174734
Cells Available
Case Processing Summary

Cases

Valid Missing Total

N Percent N Percent N Percent

Fraudulent claim * Gender 4415 100.0% 0 0.0% 4415 100.0%

Fraudulent claim * Gender Crosstabulation

Count
Total
Gender

Male Female

No 1964 1988 3952


Fraudulent claim
Yes 211 252 463

Total 2175 2240 4415

Chi-Square Tests
Value df
Asymp. Sig. Exact Sig. Exact Sig.
(2sided) (2sided) (1sided)

Pearson Chi-Square 2.820a 1 .093

Continuity Correctionb 2.657 1 .103

Likelihood Ratio 2.824 1 .093

Fisher's Exact Test .095 .051

Linear-by-Linear Association 2.819 1 .093

N of Valid Cases 4415

a. 0 cells (0.0%) have expected count less than 5. The minimum expected count is 228.09.

b. Computed only for a 2x2 table


NPAR TESTS

/CHISQUARE=claim_amount (1,30)

/EXPECTED=EQUAL

/STATISTICS DESCRIPTIVES

/MISSING ANALYSIS.

NPar Tests
Notes

Output Created 31-OCT-2023 11:17:44

Comments

C:\Program
Files\IBM\SPSS\Statistics\21\Samples\
Data English\insurance_claims.sav

DataSet1
Active Dataset
Insurance Claims
Input
File Label

Filter <none>

Weight <none>

Split File <none>

4415
N of Rows in Working Data
File

Definition of Missing
User-defined missing values are treated
as missing.
Missing Value Handling
Cases Used
Statistics for each test are based on all
cases with valid data for the variable(s)
used in that test.

NPAR TESTS

/CHISQUARE=claim_amount (1,30)

Syntax /EXPECTED=EQUAL

/STATISTICS DESCRIPTIVES

/MISSING ANALYSIS.
Processor Time 00:00:00.00

Resources Elapsed Time 00:00:00.00

Number of Cases Alloweda 196608

a. Based on availability of workspace memory.

Descriptive Statistics

N Mean Std. Deviation Minimum Maximum

Cost of claim in thousands 4415 73.0109 144.40137 1.46 1662.00

Chi-Square Test
Test Statistics

Cost of claim in
thousands

Chi-Square
1072.485a
29
df

Asymp. Sig. .000

NPar Tests
Notes
Output Created 31-OCT-2023 11:19:52

Comments

C:\Program
Files\IBM\SPSS\Statistics\21\Samples\
Data
English\insurance_claims.sav

DataSet1
Active Dataset
Insurance Claims
File Label
Input
Filter <none>

Weight <none>

Split File <none>

N of Rows in Working Data 4415

File
Definition of Missing User-defined missing values are treated
as missing.

Missing Value Handling


Cases Used Statistics for each test are based on all
cases with valid data for the variable(s)
used in that test.

NPAR TESTS

/CHISQUARE=claim_amount (1,3)

Syntax /EXPECTED=EQUAL

/STATISTICS DESCRIPTIVES

/MISSING ANALYSIS.

Processor Time 00:00:00.02

Resources Elapsed Time 00:00:00.02

Number of Cases Alloweda 196608

Descriptive Statistics

N Mean Std. Deviation Minimum Maximum

Cost of claim in thousands 4415 73.0109 144.40137 1.46 1662.00

Chi-Square Test
Frequencies

Cost of claim in thousands

Category Observed N Expected N Residual

1 1.00 12 135.0 -123.0

2 2.00 199 135.0 64.0

3 3.00 194 135.0 59.0

Total 405

Test Statistics

Cost of claim in
thousands

Chi-Square 168.193a
df
Asymp. Sig.
2
.000

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy