IBM SPSS Web Report - IlustraTtest.spv

(Controls disabled by the system)

Separator Separator
A
   
Log
** Metodologia da Investigação em Psicologia I (2013-14).
** Valentim R. Alferes (Universidade de Coimbra).

* Gerar a População 1 (N = 10000) com distribuição normal (M = 50; DP = 10).

new file.
input program.
loop NI=1 to 10000.
end case.
end loop.
end file.
end input program.
execute.

set rng=mt mtindex=random.

compute vd=rv.normal(50,10).
execute.

descriptives variables=vd.
Descriptives
Descriptive StatisticsDescriptive Statistics, table, 1 levels of column headers and 1 levels of row headers, table with 6 columns and 4 rows
  N Minimum Maximum Mean Std. Deviation
vd 10000 12 87 50.00 9.969
Valid N (listwise) 10000        
Log

save outfile='%temp%\file0'.

* Retirar uma amostra aleatória (Amostra_1) com n = 30.

set rng=mt mtindex=random.

compute na1=rv.uniform(0,1).
execute.

sort cases by na1(a).

n of cases 30.
execute.

compute Amostra=1.
execute.

save outfile='%userprofile%\desktop\Amostra_1.sav'/keep=Amostra vd.

* Retirar uma segunda amostra (Amostra_2), com n = 30, da mesma população.

get file='%temp%\file0'.

set rng=mt mtindex=random.

compute na2=rv.uniform(0,1).
execute.

sort cases by na2(a).

n of cases 30.
execute.

compute Amostra=2.
execute.

save outfile='%userprofile%\desktop\Amostra_2.sav'/keep=Amostra vd.

* Gerar a População 2 (N = 10000) com distribuição normal (M = 70; DP = 10).

new file.
input program.
loop NI=1 to 10000.
end case.
end loop.
end file.
end input program.
execute.

set rng=mt mtindex=random.

compute vd=rv.normal(70,10).
execute.

descriptives variables=vd.
Descriptives
Descriptive StatisticsDescriptive Statistics, table, 1 levels of column headers and 1 levels of row headers, table with 6 columns and 4 rows
  N Minimum Maximum Mean Std. Deviation
vd 10000 31 111 70.14 9.997
Valid N (listwise) 10000        
Log

save outfile='%temp%\file1'.

* Retirar uma amostra aleatória (Amostra_3), com n = 30, da População 2.

set rng=mt mtindex=random.

compute na3=rv.uniform(0,1).
execute.

sort cases by na3(a).

n of cases 30.
execute.

compute Amostra=3.
execute.

save outfile='%userprofile%\desktop\Amostra_3.sav'/keep=Amostra vd.

* Juntar as três amostras numa só file.

get file='%userprofile%\desktop\Amostra_1.sav'.
add files/file=*/file='%userprofile%\desktop\Amostra_2.sav'
 /file='%userprofile%\desktop\Amostra_3.sav'.
execute.

* Comparar duas amostras independentes (1 e 2) retiradas da mesma população.

T-TEST GROUPS=Amostra(1 2)/VARIABLES=vd.
T-Test
Group StatisticsGroup Statistics, table, 1 levels of column headers and 2 levels of row headers, table with 6 columns and 4 rows
  Amostra N Mean Std. Deviation Std. Error Mean
vd 1 30 51.48 6.391 1.167
2 30 50.81 10.941 1.998
T-Test
Independent Samples TestIndependent Samples Test, table, 3 levels of column headers and 2 levels of row headers, table with 11 columns and 6 rows
  Levene's Test for Equality of Variances t-test for Equality of Means
F Sig. t df Sig. (2-tailed) Mean Difference Std. Error Difference 95% Confidence Interval of the Difference
Lower Upper
vd Equal variances assumed 6.303 .015 .288 58 .774 .667 2.313 -3.964 5.298
Equal variances not assumed     .288 46.725 .774 .667 2.313 -3.987 5.322
Log

* Comparar duas amostras independentes (e.g., 1 e 3) retiradas de populações diferentes.

T-TEST GROUPS=Amostra(1 3)/VARIABLES=vd.
T-Test
Group StatisticsGroup Statistics, table, 1 levels of column headers and 2 levels of row headers, table with 6 columns and 4 rows
  Amostra N Mean Std. Deviation Std. Error Mean
vd 1 30 51.48 6.391 1.167
3 30 69.46 8.745 1.597
T-Test
Independent Samples TestIndependent Samples Test, table, 3 levels of column headers and 2 levels of row headers, table with 11 columns and 6 rows
  Levene's Test for Equality of Variances t-test for Equality of Means
F Sig. t df Sig. (2-tailed) Mean Difference Std. Error Difference 95% Confidence Interval of the Difference
Lower Upper
vd Equal variances assumed 1.190 .280 -9.094 58 .000 -17.983 1.977 -21.941 -14.025
Equal variances not assumed     -9.094 53.103 .000 -17.983 1.977 -21.949 -14.017
IBM SPSS Web Report
X