Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Hilarianne W. Engay
9-10-2019
DESCRIPTIVE STATISTICS
FREQUENCY DISTRIBUTION
a. SPSS
i. Click Analyze then mouse over Descriptive Statistics, and then click Frequencies
ii. Select one or more variables in the left column of the Frequency window, click the arrow located
in the center. Make sure the Display frequency table is checked.
iii. Click OK. It will display the frequency, cumulative frequency and percentage.
b. Excel
1
i. Click the Data tab, then click Data Analysis
iii. Choose the input range by clicking the Cell icon at the left and highlighting the values to tabulate.
Choose the Bin Range or the upper limit of each age range by clicking the Cell icon by highlighting
the values. Click a check mark on Cumulative Percentage and Chart Output.
You may set your Output options on a new worksheet.
2
3
PERCENTAGE
a. SPSS – the percentage can be taken from the frequency distribution
b. Excel
i. Select the column of a value, in this case A2, and divide it with the total, in this case B2, then
multiply it with 100B.
ii. Alternate. In the frequency distribution, select the frequency value divide it by the total value as
seen below. Then in Home tab, select the Percentage icon.
4
MEAN
a. SPSS
i. Click Analyze then mouse over Descriptive Statistics, and then click Descriptives
ii. Select one or more variables in the left column of the Descriptives window, click the arrow
located in the center. Then, click the Options
iii. In the Options window, place a check mark on Mean and Sum.
5
b. Excel
v. In an empty cell, start with =AVERAGE( then highlight the cells you want to calculate the average
of, before closing with ).
6
MEDIAN
a. SPSS
i. Click Analyze then mouse over Descriptive Statistics, and then click Frequencies
ii. Select one or more variables in the left column of the Frequency window, click the arrow located in
the center.
iv. Then click Continue. Note: The same can be used for Mean.
7
b. Excel
i. In an empty cell, start with =MEDIAN( then highlight the cells you want to calculate the average of,
before closing with ).
8
STANDARD DEVIATION
a. SPSS
i. Click Analyze then mouse over Descriptive Statistics, and then click Descriptives
ii. Select one or more variables in the left column of the Descriptives window, click the arrow located in
the center. Then, click the Options
9
b. Excel
i. In an empty cell, start with =STDEV.S( then highlight the cells you want to calculate the average of,
before closing with ). Note: STDEV.S is used if the standard deviation will be from a sample. Use
STDEV.P if the standard deviation will be from a population.
10
INFERENTIAL STATISTICS
SPEARMAN RANK CORRELATION
a. SPSS
i. Click Analyze, then Correlate, and then choose Bivariate.
ii. Select the variables to use on the left column of Bivariate Correlations window. Then, click the center
arrow to transfer the variables on the right column.
iii. Mark the Spearman with a check mark. Then click OK.
b. Excel
11
i. In the next column, after the columns of values, type =RANK.(cellofchosenvalue,columnofthevalues,1)
as shown below:
ii. Drag down the equation in the first cell until the last row. Do the same to the next columns.
iii. In the Data tab, click Data Analysis, and choose Correlation.
12
v. Click OK.
13
PEARSON CORRELATION
i. Click Analyze, then Correlate, and then choose Bivariate.
ii. Select the variables to use on the left column of Bivariate Correlations window. Then, click the center
arrow to transfer the variables on the right column.
iii. Mark the Pearson with a check mark. Then click OK.
c. Excel
i. In the Data tab, click Data Analysis, and choose Correlation.
14
ii. Highlight the rank columns of each variable in Input Range.
15
LINEAR REGRESSION
a. SPSS
i. Click Analyze then mouse over to Regression. In it, click Linear.
ii. In Linear Regression windows, in the left column, select the dependent variable then click the center
arrow. Do the same for the independent variable. In this case, Rainfall_mm will be the independent
variable and the Umbrella_sold will be the dependent variable. Finally, click Statistics.
iii. In Statistics window, place a check mark on the following options: Estimates, Model fit, Descriptives,
Collinearity diagnostics and Durbin-Watson. Then click Continue.
iv. Click Plots. In Linear Regression Plots window, transfer the *ZRESID from the left column to the Y box by
clicking the center arrow. Do the same for *ZPRED. Click Continue.
16
v. Click OK.
17
b. Excel
i. In the Data tab, select Data Analysis and choose Regression.
ii. In Input Y Range, highlight the values of the dependent variables. In Input X Range, highlight the values
of the independent variables. Mark a check mark on the following options: Labels, and Residuals.
Regression Statistics
Multiple R 0.972694792
R Square 0.946135159
Adjusted R Square 0.940748675
Standard Error 3.003724496
Observations 12
ANOVA
df SS MS F Significance F
Regression 1 1584.776392 1584.776 175.6499 1.14185E-07
18
Residual 10 90.22360845 9.022361
Total 11 1675
Coefficients Standard Error t Stat P-value Lower 95% Upper 95% Lower 95.0% Upper 95.0%
Intercept -17.03920664 3.763671394 -4.52728 0.001096 -25.4251891 -8.653224186 -25.4251891 -8.653224186
Rainfall (mm) 0.433289057 0.032692928 13.2533 1.14E-07 0.360444674 0.506133441 0.360444674 0.506133441
PROBABILITY OUTPUT
RESIDUAL OUTPUT
Umbrellas
Observation Predicted Umbrellas sold Residuals
Percentile sold
1 18.49049605 -3.490496054
4.166667 15
2 23.04003116 1.959968844
12.5 17
3 19.01044292 -2.010442923
20.83333 20
4 25.29313425 2.706865746
29.16667 22
5 40.11162001 0.888379986
37.5 25
6 44.18453715 2.815462847
45.83333 28
7 54.62680343 -4.626803434
54.16667 30
8 43.62126138 2.378738622
62.5 37
9 37.85851692 -0.858516916
70.83333 41
10 25.33646316 -3.33646316
79.16667 46
11 20.3103101 -0.310310095
87.5 47
12 26.11638346 3.883616537
95.83333 50
19
t-TEST
INDEPENDENT t-TEST
a. SPSS
i. Click Analyze, then mouse over Compare Means, and click Independent Sample T-Test
ii. In the Independent Sample T Test window, transfer the dependent variables on the left column to the
right column by clicking the center arrow button.
iii. Click on the Define Groups. Then choose Use specified values, and indicate the groupings used in the
independent variable or Grouping Variables. In this case, 1 and 0 was used.
20
b. Excel
i. In Data tab, mouse over Data Analysis and choose F-Test Two Sample Variance. This is to check if the
data have equal variance or not.
ii. In F-Test Two Sample Variance window, in Variable 1 Range text box, highlight the first column. Do
the same for Variable 2 Range text box. Check the Label and choose the Output Options.
Female Male
21
Mean 33 24.8
Variance 160 21.7
Observations 6 5
df 5 4
F 7.373271889
P(F<=f) one-tail 0.037888376
F Critical one-tail 6.256056502
iv. Choose either t-Test: Two-Sample Assuming Equal Variance if the variances are equal, or t-Test: Two-
Sample Assuming Unequal Variance.
v. In Variable 1 Range, highlight the first column. In Variable 2 Range, highlight the second column. Mark
Labels and input 0 as Hypothesized Mean Difference. Choose the Output Options preferred.
Female Male
22
Mean 33 24.8
Variance 160 21.7
Observations 6 5
Hypothesized Mean Difference 0
df 7
t Stat 1.47260514
P(T<=t) one-tail 0.092170202
t Critical one-tail 1.894578605
P(T<=t) two-tail 0.184340405
t Critical two-tail 2.364624252
DEPENDENT t-TEST
a. SPSS
i. In Analyze, mouse over Compare Means then click Paired-Samples T Test.
ii. In Paired Samples T Test, select the two variables to find a relationship from the left column and transfer to the
right column by clicking center arrow button.
23
b. Excel
i. In Data tab, click Data Analysis then choose t-Test Paired Two Sample for Means. Click OK.
ii. In Variable 1 Range, highlight the first column. In Variable 2 Range, highlight the second column. The
Hypothesized Mean Difference is 0.
25
CHI-SQUARE
TEST OF INDEPENDENCE / TEST OF HOMOGENEITY FOR PROPORTION
a. SPSS
i. In Analyze, mouse over to Descriptive Statistics and click Crosstabs.
ii. In the Crosstabs window, select the categorical variables needed for Row(s) and Columns(s) that can be
seen in a tabulated graph by clicking the center arrow. Then click Statistics.
iii. In the Statistics window, mark a check on Chi-square. Then click Continue.
26
iv. In the Crosstabs window, click OK.
b. Excel
For the following instructions, the steps will be closely related to manually solving for the CHI-SQUARE of a
problem.
a. Calculate for the Expected frequency per category. This is done by multiplying the row total and column
total, then dividing them to the grand total of both.
27
b. In a separate table, calculate for the Chi-square. This is done by finding the square of the difference of
each observed value to the respective expected value, then divide it by the expected value.
c. Then, find the sum of all the static solved from Step b by row, afterwards the column of the total. This is
the Chi-square statistic.
d. Calculate for the degrees of freedom – (number of row – 1)(number of columns – 1).
28
f. Calculate the p-value computed in Step c. by typing =CHISQ.DIST.RT(chi square statistic, degree of
freedom).
g. Optional. Maximum Likelihood Test may also be tested by multiplying the observed data to ln observed
data/expected data per cell. Then, add up all the data and multiplied by 2.
29
TEST OF GOODNESS OF FIT
a. SPSS
i. In Analyze, mouse over Nonparametric Tests, choose Chi-square under Legacy Dialogs.
ii. In Chi-square Test window, select the testing variable from the left column to the right with the center
arrow. Make sure the following options are selected: Get from data and All categories equal.
30
b. Excel
For the following instructions, the steps will be closely related to manually solving for the CHI-SQUARE of a
problem.
a. Calculate for the Expected frequency. This is done by dividing the grand total frequency to the number of
categories in the variable.
b. In a separate table, calculate for the Chi-square. This is done by finding the square of the difference of each
observed value to the respective expected value, then divide it by the expected value.
c. Then, find the sum of all the static solved from Step b. This is the Chi-square statistic.
31
d. Calculate for the degrees of freedom – (number of column – 1)(number of columns – 1).
f. Calculate the p-value computed in Step c. by typing =CHISQ.DIST.RT(chi square statistic, degree of freedom).
32
ANALYSIS OF VARIANCE (ANOVA)
ONE WAY ANALYSIS OF VARIANCE
a. SPSS
i. In Analyze, then mouse over Compare Means and click One-Way ANOVA.
ii. In the left column of One-Way ANOVA window, transfer the dependent variables to Dependent List,
and the factors or independent variables to Factor textbox. Then, click Options.
iii.
33
v. Click OK.
b. Excel
i. In Data tab, mouse over Data Analysis and choose Anova Single Factor.
ii. In the Anova: Single factor window, then in Input Range, highlight the variables and values to be
compared.
34
iii. Click OK.
Anova: Single Factor
SUMMARY
Groups Count Sum Average Variance
City 1 20 11551 577.55 10775
City 2 20 13060 653 7238.105
City 3 20 12173 608.65 8670.239
ANOVA
Source of Variation SS df MS F P-value F crit
Between Groups 57512.23 2 28756.12 3.233041 0.046773 3.158843
Within Groups 506983.5 57 8894.447
Total 564495.7 59
ii. In the Univariate window, pick the dependent variable and the factors by clicking the center arrow.
Click Plots.
35
iii. In Profile Plots select the factors to be placed in a graph by clicking the center arrow. Click Add then
Continue.
iv. In Univariate window, click Post Hoc. In Post Hoc window, select the main factor to be tested then
click the center arrow. Finish by clicking Tukey and Continue.
v. In Univariate windows, click Options. Select all of the factors and transfer to the right column by
clicking center arrow. Place a check mark on Estimates of effect size and Homogeneity traits. Finish
with clicking Continue.
36