Download The one-sample t test can be used whenever sample means must

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

History of statistics wikipedia , lookup

Statistics wikipedia , lookup

Transcript
Doing Data Analysis With SPSS Version 14
Dr. Nafez M. Barakat
Selecting cases
In this section we demonstrates how SPSS can be used to select n cases
from finite population of interest using simple random sampling.
Example : select the cases related to males students .
Choose from the menu:
Data
Select Cases...
Select If condition is satisfied.
Click If.
Select gender to pasted in the Expression area.
Select "=" on the calculator pad.
Islamic University of Gaza
42
Faculty of Commerce
Doing Data Analysis With SPSS Version 14
Dr. Nafez M. Barakat
To complete the expression, type 1
Click Continue.
Click OK in the Select Cases dialog box.
Islamic University of Gaza
43
Faculty of Commerce
Doing Data Analysis With SPSS Version 14
Dr. Nafez M. Barakat
The figure below show the 10 cases.
Remarks:
1: if we want to select random cases we follow this procedures:
Choose from the menu:
Data
Select Cases...
Random sample of cases
Sample,
If we you want to select 50% from the cases randomly , write 50 inside
the box (approximately)
Islamic University of Gaza
44
Faculty of Commerce
Doing Data Analysis With SPSS Version 14
Dr. Nafez M. Barakat
And if you want to select 5 cases from the first 10 cases write in the box
exactly, and write 10.
Click OK in the Select Cases dialog box
2. if you want to select cases that fall within the encusive case( row)
range or date/time range. Date and time ranges are only available for
time-series data with defined data variables ( Data menue, Define Date).
All values must be positive integers.
Choose from the menu:
Data
Select Cases...
Random sample of cases
Sample,
Based on time or case range
Range
If you want to select from the third cases to tenth cases , write 3 in the
box " first case" and 10 in the box " last case"
Islamic University of Gaza
45
Faculty of Commerce
Doing Data Analysis With SPSS Version 14
Dr. Nafez M. Barakat
Click Continue.
Click OK in the Select Cases dialog box.
Islamic University of Gaza
46
Faculty of Commerce
Doing Data Analysis With SPSS Version 14
Dr. Nafez M. Barakat
Inference for
Distributions
One sample hypothesis tests
The one-sample t test can be used whenever sample means must be
compared to a known test value. As with all t tests, the one-sample t test
assumes that the data be reasonably normally distributed, especially with
respect to skewness. Extreme or outlying values should be carefully
checked; boxplots are very handy for this.
Before proceeding with the one-sample t test , we must verify the
assumption of normality distributed data, by getting a histogram or a
stemplot or a boxplot graph or by using normality test ( One Sample t
test) , see the results below
The One-Sample T Test procedure:



Tests the difference between a sample mean and a known or
hypothesized value
Allows you to specify the level of confidence for the difference
Produces a table of descriptive statistics for each test variable
Example: This example uses the file score.save. Use One Sample T Test
to determine whether or not the mean score of math for the sample
significantly differ from 75 .
Islamic University of Gaza
47
Faculty of Commerce
Doing Data Analysis With SPSS Version 14
Dr. Nafez M. Barakat
Note: The data used in one sample t test is a quantitative data.
Before proceeding with the one-sample t test , we must verify the
assumption of normality distributed data, by getting a histogram or a
stemplot or a poxplot graph or by using normality test ( One Sample t
test) , see the results below which shows that the distribution of the math
score is a normal distribution.
Histogram plot for math
Count
15
10
5
0
50
60
70
80
90
math
Islamic University of Gaza
48
Faculty of Commerce
Doing Data Analysis With SPSS Version 14
Dr. Nafez M. Barakat
Normal Q-Q Plot of MATH
3
2
1
Expected Normal
0
-1
-2
-3
40
50
60
70
80
90
100
110
Observed V alue
Islamic University of Gaza
49
Faculty of Commerce
Doing Data Analysis With SPSS Version 14
Dr. Nafez M. Barakat
Boxplot plot for math
110
100
90
80
70
60
50
40
N=
74
MATH
Many parametric tests require normally distributed variables. The
one-sample Kolmogorov-Smirnov test can be used to test that the
math scores, is normally distributed.
To begin the analysis, from the menus choose:
Analyze
Nonparametric Tests
1-Sample K-S...
Islamic University of Gaza
50
Faculty of Commerce
Doing Data Analysis With SPSS Version 14
Dr. Nafez M. Barakat
Select math variable as the test variable.
select Normal as the test distribution.
Click OK.
The results are shown below.
Islamic University of Gaza
51
Faculty of Commerce
Doing Data Analysis With SPSS Version 14
Dr. Nafez M. Barakat
One-Sam ple Kolm ogorov-Sm irnov Test
N
Normal Parametersa,b
Most Extreme
Differences
Mean
St d. Deviation
Absolute
Positive
Negative
Kolmogorov-Smirnov Z
As ymp. Sig. (2-tailed)
MATH
74
74.49
14.126
.123
.123
-.094
1.057
.214
a. Test distribution is Normal.
b. Calculated from data.


distribution is based on data from 74 randomly sampled math
scores. The sample size figures into the test statistic above.
The Z test statistic is the product of the square root of the sample
size and the largest absolute difference between the empirical and
theoretical CDFs. Which equal 1.057, and the Sig.( 2-tailed) equal
0.214 which is greater than 0.05, which mean that the distribution of
the math score is normal.
To begin the one-sample t test, from the menus choose:
Analyze
Compare Means
One-Sample T Test...
Islamic University of Gaza
52
Faculty of Commerce
Doing Data Analysis With SPSS Version 14
Dr. Nafez M. Barakat
Select math as the test variable.
Type 75 as the test value.
Click Options.
Type 90 as the confidence interval percentage.
Click Continue.
Click OK in the One-Sample T Test dialog box.
Islamic University of Gaza
53
Faculty of Commerce
Doing Data Analysis With SPSS Version 14
Dr. Nafez M. Barakat
The Descriptives table displays the sample size, mean, standard deviation,
and standard error for the math scores. The sample means disperse around
the 75 standard by what appears to be a small amount of variation.
T-Test
One-Sample Statistics
N
MATH
74
Mean
74.49
Std. Deviation
14.126
Std. Error
Mean
1.642
The test statistic table shows the results of the one-sample t test.
One-Sample Test
Test Value = 75
MATH
t
-.313
df
73
Sig. (2-tailed)
.755
Mean
Difference
-.51
90% Confidenc e
Int erval of t he
Difference
Lower
Upper
-3. 25
2.22

The t column displays the observed t statistic for each sample,
calculated as the ratio of the mean difference divided by the standard
error of the sample mean, and we noticed that the absolute value of t
statistics is less than the tabulated t = 1.99, so we can safely accept Ho (
null hypotheses) and reject Ha ( alterative hypotheses), which mean
that the average math scores for population equal 75

The df column displays degrees of freedom. In this case, this equals
the number of cases minus 1.

The column labeled Sig. (2-tailed) displays a probability from the t
distribution with 73 degrees of freedom. The value listed is the
probability of obtaining an absolute value greater than or equal to the
observed t statistic, if the difference between the sample mean and the
test value is purely random.
Islamic University of Gaza
54
Faculty of Commerce
Doing Data Analysis With SPSS Version 14
Dr. Nafez M. Barakat
Since the value of (sig. 2-tailed)or (p-value) = 0.755 which is greater
than 0.05, so we can safely accept Ho ( null hypotheses) and reject Ha (
alterative hypotheses), which mean that the average math scores for
population equal 75

The Mean Difference is obtained by subtracting the test value (75
in this example) .

The 90% Confidence Interval of the Difference provides an
estimate of the boundaries between which the true mean difference lies
in 90% of all possible random , we noticed that the " 0 " value lie
inside the 90% Confidence Interval of the Difference ( -3.25, 2.22), so
we can safely accept Ho ( null hypotheses) and reject Ha ( alterative
hypotheses), which mean that the average math scores for population
equal 75.
Remark: If we want to test the null hypotheses H O: µ = µO versus the
following alternative hypotheses:
1: HO: µ ≠ µO , we reject the null hypotheses if the p-value < α.
2: HO: µ > µO , we reject the null hypotheses if the p-value < α/2
3: HO: µ < µO , we reject the null hypotheses if the p-value <1- α/2
Islamic University of Gaza
55
Faculty of Commerce