SPSS Prgms - P10

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 11

10). Open the Cars.sav file!

Transform / Select Data

a) How old are the cars? Create a new variable as age!


1. Choose Transform / Compute Variable
2. Type the name of target variable as, age and type 2024-year in the Expression field.
3. Click Ok.

b) What is the ratio of American, European and Japanese cars within cars with higher
consumption than 20 miles per gallon?

1. Choose: Analyze / Descriptive Statistics / Frequencies… Select the variable, Country


of Origin and then press OK.

Country of Origin
Cumulative
Frequency Percent Valid Percent Percent
Valid American 253 62.3 62.5 62.5
European 73 18.0 18.0 80.5
Japanese 79 19.5 19.5 100.0
Total 405 99.8 100.0
Missing System 1 .2
Total 406 100.0

c) What is the ratio of those American cars which have 4-6-8 cylinders?

Estimation and Hypothesis Testing


a) Define a 95% confidence interval for the vehicle weight!

1. To define a confidence interval choose Analyze / Compare Means / One Sample T Test.
2. Choose the variable vehicle_weight as the Test_variable.
3. Click on Options to set the confidence level as 95%.
4. After clicking on OK, the results will be appeared in the Output window.
b) Define a 90% confidence interval for the horsepower!

c) Define a 98% confidence interval for the time to accelerate!


d) Test the hypothesis that the average consumption of cars is 20 miles per gallon! (α
= 5%)

1. Choose Analyze / Compare Meabjns / One Sample T Test…


2. Select the test variable as miles per gallon and enter the test value 20.
3. After clicking on OK, the results will be appeared in the Output window.
e) Test the hypothesis that the average horsepower of cars is 100! (α = 5%)
1. Choose Analyze / Compare Means / One Sample T Test…
2. Select the test variable as horsepower and enter the test value 100 which each mean sample is
compared.
3. After clicking on OK, the results will be appeared in the Output window.
i) Check if the horsepower follows a normal distribution or not!
Statistical Dependence
a) Create a crosstabs from the model year and the country of origin!
1. Choose Analyze / Descriptive Statistics / Crosstabs.
2. Move the variable year to the Row and country of origin to Column.
3. After clicking on OK, the results will be appeared in the Output window.

Model Year (modulo 100) * Country of Origin Crosstabulation


Count
Country of Origin
American European Japanese Total
Model Year (modulo 100) 70 26 6 2 34
71 20 5 4 29
72 18 5 5 28
73 29 7 4 40
74 15 6 6 27
75 20 6 4 30
76 22 8 4 34
77 18 4 6 28
78 22 6 8 36
79 23 4 2 29
80 7 9 13 29
81 13 5 12 30
82 20 2 9 31
Total 253 73 79 405

b) Create a crosstabs from the number of cylinders and the country of origin!
1. Choose Analyze / Descriptive Statistics / Crosstabs.
2. Move the variable number of cylinders to the Row and country of origin to Column.
3. After clicking on OK, the results will be appeared in the Output window.

Number of Cylinders * Country of Origin Crosstabulation


Count
Country of Origin
American European Japanese Total
Number of Cylinders 3 Cylinders 0 0 4 4
4 Cylinders 72 66 69 207
5 Cylinders 0 3 0 3
6 Cylinders 74 4 6 84
8 Cylinders 107 0 0 107
Total 253 73 79 405

c) Is there any relationship between the country of origin and engine displacement?
1. Choose Analyze / Descriptive Statistics / Crosstabs.
2. Move the variable country of origin to the Row and engine displacement to Column.
3. After clicking on OK, the results will be appeared in the Output window.
d) Is there any relationship between the country of origin and horsepower?

1. Choose Analyze / Descriptive Statistics / Crosstabs.


2. Move the variable country of origin to the Row and horsepower to Column.
3. After clicking on OK, the results will be appeared in the Output window.

e) Is there any relationship between the country of origin and vehicle weight?
1. Choose Analyze / Descriptive Statistics / Crosstabs.
2. Move the variable country of origin to the Row and vehicle weight to Column.
3. After clicking on OK, the results will be appeared in the Output window.

You might also like