You are on page 1of 39

Summary Research and Statistics

Inhoud
Normal distribution...............................................................................................................................3
Student T-distribution...........................................................................................................................4
Student t-test........................................................................................................................................5
One-sample t-test..............................................................................................................................5
Independent sample t-test................................................................................................................6
Paired samples t-test.........................................................................................................................7
Chi-square test......................................................................................................................................8
ANOVA...................................................................................................................................................9
Levene’s test for equal variances.....................................................................................................12
Post-hoc test....................................................................................................................................12
Correlation coefficient.........................................................................................................................13
Regression analysis..............................................................................................................................15
Multiple regression..............................................................................................................................18
Model selection...............................................................................................................................21
Required number of cases...............................................................................................................22
Multicollinearity..............................................................................................................................23
Summary multiple regressions:.......................................................................................................24
Logistic regression analysis..................................................................................................................25
Binary logistic regression and a single independent variable..........................................................25
Binary logistic regression and multiple independent variable.........................................................27
Multinomial logistic regression............................................................................................................29
Non-parametric methods....................................................................................................................31
Non-parametric test........................................................................................................................32
The Mann-Whitney U test...........................................................................................................33
The Kruskas-Wallis H test............................................................................................................34
The Wilcoxon T-test.....................................................................................................................35
The Spearman correlation...........................................................................................................36
Advantages and disadvantages of non-parametric methods..........................................................37
Normal distribution

Standard normal distribution

Standard deviation of sample averages


Student T-distribution
The student t-distribution has the following signatures:

 Larger variance than standard normal distribution.


 A larger uncertainty is taken into account  σ is estimated by sample stand. Dev. Sample.

Use the student t-distribution since the population variance is unknown.

1. Calculate the degree of freedom as df=N-1.


2. Given df, determine the critical values of t for a 95% confidence interval.

3. Calculate the standard deviation of sample averages using


4. Given the sample average x, calculate the interval.
Student t-test
One-sample t-test
The concept of hypothesis testing

A statement is made. We assume this statement is correct and there is no difference, we call the the
Null hypothesis. After that we say the statement is not correct an there is a difference, this we call
the Alternative hypothesis.

 We use a standardization of the test variable.


 The standardized form is called the t-value and is calculated as:

Difference between tow-tailed and one-tailed:

In a one-tailed test the p-value is twice as


small

Summary of important concepts:

 Student t-distribution: population variance is estimated  more uncertainty compared to z-


distribution.
 Confidence interval for an estimate of population average based on a sample
 One-sample t-test: is the average different from a know average?
 One-tailed or two-tailed testing depends on the formulation of the alternative hypothesis.

Independent sample t-test


Student t-test for differences between averages

This test is used to test if there is a difference between groups, for example income and gender

Conditions that needs to be met:

1. The 2 samples are different and independent


a. Sample 1: only men, Xman=income
b. Sample 2: only woman, Xwoman=income
2. The sampling distribution should be normally distributed, this is the case if:
a. The variables is normally distributed
b. If each group has more than 30 cases

Use the F-test (Levene’s test) to test if the unknown variances are equal.

Independent Samples Test:

Conclusion of the Independent samples test above:

 Probability P(t>2.488)=0.015/2=0.0075  null hypothesis is rejected


Summary

Hence, perform 3 steps

1. If one-sided: does the difference have the right sign?


2. Is the variance between the two groups equal or not equal?
3. Conduct the proper t-test.

Paired samples t-test


Compare averages of 2 variables in the same group.

Examples of cases:

 The same group of individuals, compare averages of two variables.


 Matched pairs of individuals, an individual in experimental group and a individual in control
group which are the same on relevant characteristics. Difference is the impact on the
experimental variable.

Example

The same group of students completed two test: Test 1 and Test 2.

Question: are Test 1 and Test 2 equally difficult/easy?


Chi-square test
For relations between categorical variables

In a chi-square test u can see the relationship between two nominal/ordinal variables.

First pick an independent variable, for example Gender.

Than pick a dependent variable, for example Transport mode.

Based on: Difference between expected and observed frequency

Expected frequency: The frequency that would result if men and women choose the transport
modes with equal frequency.

Test of independence: if there is no difference between man and woman in transport-mode choice,
then gender and transport-mode choice are independent of each other.

Summary:

 Two variables of nominal/ordinal measurement level


 Inverstigate:
o Null hypothesis: they are independent
o Alternative hypothesiss: They are not independent
 Cross-table: observed frequencies in a sample
 Chi-square: a measure of difference with expected frequencies if independent
 Power of the test depends on degrees of freedom
 Chi-square test can only be tested 2-sided
 Conditions:
o Not more than 20% of ei is smaller than 5
o All ei are larger than zero
ANOVA
Analysis of variance

With the Anova test u can test the difference in averages between more than 2 groups.

ANalysis Of Variance, ANOVA

Test in one test run if the found differences in the averages are sample error or not.

ANOVA: Compares

o The between groups variance (MSB)


 Observed variance between averages
 Measure the differences between groups
o The within-groups variance (MSW)
 Expected variance between averages
 Measure the variance within the groups
If H0 is true than Between-Groups Variance = Withing-Groep Variance (F=1)

If H0 is not true than Between-Groeps Variance > Within-Groups Variance (F>1)


F-distribution

Example transport mode groups:

Conditions for using ANOVA:

 Groups are independent of each other


o Groups do not overlap
o No matching have been applied
 Dependent variable is normally distributed
o This should hold also for each group
o But: test is not very sensitive for deviations
o And: is not needed for large group sizes(N per group>30)
 Variance of groups are equal
o This is not needed if groups are approximately of the same size.
Levene’s test for equal variances

Post-hoc test
 Compare all pairs of groups
 Use stricter alpha compared to t-test
 Different correction methods for alpha exist
 Arbitrarily, choose ‘Benferroni’ in SPSS

NOTE: Post-hoc tests are relevant only if the differences are significant in ANOVA

Summary of analysis of variance:

 Are there differences in averages of more than 2 groups?


 Investigate:
o Null hypothesis: Average of groups are equal
o Alternative hypothesis: averages of groups are different
 Conditions
o Groups are independent
o Dependt variable normally distributed
o Variances of groups are equal
 Levene’s test: are variances of groups equal?
 Post-hoc test: Which groups differ from each other?
Correlation coefficient

Covariance: A measure for the strength of a linear relation between variables X and Y:

Disadvantage of covariance:

 Size of the covariance of X and Y depends on the scales on which X and Y are measured

Correlation coefficient can have a positive linear relation, a negative linear relation or no linear
relation.

Null hypothesis = There is no relation between X and Y  p(X,Y)=0

Alternative hypothesis = there is a relation between X and Y  p(x,Y) can’t be 0


Number of freedom = n-2

Use the Student t-test for testing the null hypothesis.

Conditions:

 Between the variables a linear relation should exist


 No extreme values in both variables

Interpretation correlation = indicates direction an strength of relationship between 2 variables of at


least interval level.

 Direction
o Positive: low values of X go more often together with low values of Y
o Negative: low values of X go more often together with high values of Y
 Strength
o Values closer to +1 or -1 indicate a stronger linear relation between X an Y
Regression analysis
Can we predict the value of Y better if we know the value of X?

Linear relation between the depend variable Y and the independent variable X in reality.

With the values in the sample  and  can be estimated.


0 1

Check before-hand:

 Linear relation
 Constant variance
 Normal distribution
Goals of regression model:

1. Forecasting the dependent variable by the independent variable


a. How many people can be expected in a new shopping center when it will be built in
a densely populated neighborhood.
2. Explaining the dependent variable by the value of the independent variable
a. Why do so little people visit the current shopping center? Do they live too far away?

Explained variance:

 That part of the variance in Y that is explained by the values of the independent variable X
Summary:

 Variance
o Indicator for prediction error
 R-square
o How much of the prediction error can be reduced by another variable
 Correlation
o Strength and direction of relationship
o Standardized (covariance = unstandardized)
 Regression coefficient
o To what extent Y changes if X changes by one unit
Multiple regression
Finding the effect of a predictor on a variable while controlling for the effect of other predictors

Goal of multiple regression:


Standardized variables:

 Why standardization
o To compare variables that are measured on different scales
o For example: temperature in Fahrenheit and Celsius

Standardized versus unstandardized coefficients

Use of standardized regression coefficient:

 Coefficients as if the analysis performed on standardized variables  expressed in standar


deviations
 The standardized coefficients can therefore directly be compared
 Standardized coefficients denote the weight of each variable
o Size: 0.547, income: 0.467  size has a larger effect on credit cards than income
 Can we use the coefficients to predict values?
o Only if we use the standardized values of predictors
o If we use the original values, we need unstandardized coefficients

Comparison single and multiple regression analysis

 Why is the partial regression coefficient (multiple regression) lower than the regression
coefficient( simple regression)?
 The multiple regression coefficient is different, because it is controlled for income
 The partial coefficient is lower, because the correlation between the predictors is positive
 In a simple regression one assumes that SIZE is not correlated to any other predictor, which
does not hold in this case; therefore multiple regression is better

Use of regression coefficients


Model selection
How can we select the best model from a pool of many potential predictors?

Parsimony

 Strive for parsimonious models


o Models that have the highest explained variance (R 2), but with the least number of
predictors
 Why parsimony?
o Avoid ‘overfitting’
o A sample is not the population  contains sampling errors!
o A high fitting model may fit the sample well, but also partly explains sampling errors
o The more the model explains typical characteristics of a sample, the less
representative it is for the population
o In general: fewer predictors  higher generalizability

Steps in method ‘stepwise’

1. Predictor with highest correlation with dependent variable is the first to enter the model
2. Second predictor is the variable with highest partial correlation with dependent variable
3. Test whether first predictor is still significant after adding second predictor. If not, it is
removed
4. Repeat from step 2 for all next predictors
Required number of cases
Rules of thumb for designing research

Rules of thumb 1

 More than 20 observations


o To attain power of at least .80
o Less than 20 cases? Only very strong relations will become significant
 Less than 1000 observations
o than significant coefficients are also relevant
o more than 1000  almost all coefficients will be statistically significant

Rules of thumb 2

 sample results are generalizable to populations if:

By using multiple regression we correct for correlations between predictors. However, this poses
problems if correlations are high.
Multicollinearity
Problems caused by high correlations between predictors

 if correlations between predictors; >0.90


 problems with regression coefficient
o negative signs where positive are expected
o large differences in strength, where equal strengths are expected
o no significant coefficients
 There are limits in correcting for correlations between predictors

Solution for multi-collinearity

 Remove highly correlating predictor


o Explained variance will hardly decrease
o However, do not conclude that removed predictor does not influence dependent
variable
 Combine predictors
o Construct a new variable by summing (z-) scores
o If possible: check reliability (use crombach alpha analysis)
Summary multiple regressions:
 Regression analyses
o Allows examining the effect of predictor on dependent while controlling for the
effect of other predictors: the ‘pure’effect
 Unstandardized coefficients
o The change in a dependent variable by one unit change in a predictor variable: used
for predicting
 Standardized coefficients
o The weight of a predictor: used for explaining
 Multicollinearity
o If correlations between predictors are high (>0.90), than estimated multiple
regression coefficients are no longer reliable
 Dummy variables
o Allows to include dichotomous variables as predictor
 Testing differences between two groups
o Code groups as dummy variable
o Testing interactions-effect: coefficients * dummy
Logistic regression analysis

Binary logistic regression and a single independent variable

Advantages of Logit

 Has properties of a linear regression model


 Logit between -infinity and +infinity
 Probability (P) constrained between 0 and 1
 Directly related to notion of odds ratio of an event
For each coefficient the null hypothesis is:

 H0 the coefficient = zero

The Wald statistic is Chi-square X2 distributed with one degree of freedom (df=1)
Binary logistic regression and multiple independent variable

 More than one independent variable


o Dichotomous or interval/ratio measurement level
 Interpretation of bi
o Increase in log-odds for a one unit increase in X with all the other X’s constant
o Measure association between X and log-odds adjusted for all other X

The variable ‘Number of cars in the household’(Ncar) is added to the model:

Significance of the transport-mode model

There are 2 type of number of measures of goodness-of-fit:

 R2 measure
 Percentage of correct predictions
R2 measures:

 The R square measures for logistic regression are comparable to the T square measure for
linear regression
 They involve a transformation of the log-likelihood ratio on a zero-one scale
 R2=1, means that the increase in goodness-of-fit is maximal (the model predicts cases
perfectly)
 R2=0, means the model does not improve the prediction compared to a model without
coefficients

SPSS reports:

 Cox and Snell’s R2


 Nagelkerke’s R2
 The maximum of Cox and Snell’s R2 can be and usually is less than 1.0, making it difficult to
interpret
 Nagelkerke’s R2 divides Cox and Snell’s R2 by its maximum in order to achieve a measure
that ranges from 0 to 1
 Therefore, Nagelkerke’s R2 will normally be higher than the Cox and Snell measure but will
tend to be lower than the corresponding R2 in linear regression

Measures of Goodness of Fit- Percentage of correct predictions:

 If the model predicts a probability > 0.5, than we predict the event will happen (Y=1)
 If the model predicts a probability < 0.5, than we predict the event will not happen (Y=0)

Summary of some properties of logistic regression:

 Logistic regression does not assume a linear relationship between the dependent and the
independents
 It is also possible and permitted to add interaction an power term s as variables on the right-
hand side of the logistic equation, as in linear regression
 The dependent variable needs not be normally distributed
 The variance of the dependent variable does not need to be homogeneous across levels of
the independents
 Normally distributed error terms are not assumed
Multinomial logistic regression
The dependent variable has more than two categories

 In Binary logistic regression the dependent variable is dichotomous (which of two events
occurs?). In multinomial regression the dependent variable is categorical (which of multiple
events occurs?)
 We study the relationship between a categorical dependent variable and one or more
interval/ratio or dichotomous independent variables

Principle of multinomial logistic regression analysis:

 Multinomial logistic regression compares multiple categories through a combination of


binary logistic regressions
 One category is used as reference group. Hence, if we have k categories, than we have k-1
pairwise comparisons  k-1 binary logistic regression analyses
 In SPSS: the group with the highest number is used as reference group, unless indicated
otherwise
Level of measurement requirements:

 As in linear and binary logistic regression, dummy variables should be used for categorical
independent variables
 SPSS will automatically dummy-code categorical variables. So, they can be entered directly
 In SPSS, categorical variables are included as ‘’factors’’ and interval/ratio variables as ‘’co-
variates’’

Summary of some properties of multinomial logistic regression

 As binary logistic regression, multinomial logistic regression does not make any assumptions
of normality, linearity, an homogeneity of variance for the independent variables
 Because it does not impose these requirements, it is preferred to discriminant analysis when
the data does not satisfy the assumptions
Non-parametric methods

Levels of measurement;

Nominal

 1≠2≠3
o Numbers just indicate the different categories
o Thus no ordering
o Colors, gender, means of transport
 Transformation
o Numbers are fully interchangeable between categories
 Example
o Means of transport; 1=car 2=bike 3=train
o Is equivalent to; 2=car 3=bike 1=train
 Dichotomous
o Variable of nominal level with only 2 categories
o Gender; 1=male 2=female

Ordinal level

 1<2<3 or 1>2>3
o There is an order between categories
o No equal differences consecutive categories
o Hierarchical levels, level of education, rank order
 Transformation
o Any transformation, as long as order between categories stays the same
 Example
o Educational level ; 1=secondary school 2=MsC 3=PhD
o Or 2=secondary school 5=MsC 7=PhD

Interval Level

 2-1 = 4-3 but 2≠2*1


o Order with equal differences between categories
o No absolute zero value
o Preferences on rating scale, intelligence, degree, Fahrenheit
 Transformation
o Keep equal differences
o Any linear transformation
 Example; Temperature in Celsius or Fahrenheit
o Right; difference 20-10=2*(15-10)
o Wrong;if temperature decrease from 20 to 10, it does not become twice as cold
(rate in Fahrenheit; 68/50=1.36≠2)
Ratio level

 2=2*1
o Order & equal intervals & absolute zero value
o Kilo’s, distance, age, temperature in Kelvin
 Transformation
o Keep equal proportions
o Multiply by number; kilo=2*pound
 Example equal proportions
o 20 kilometers is twice as much as 10 kilometers
o Weight 40 kilos is twice as heavy as 20 kilos

Non-parametric test
A non-parametric test will be used when:

 The number of observations is small(n<30) AND


 The distribution deviates from normality
 A solution is to convert the interval/ratio scores into ranks and then apply a NON-
PARAMETRIC test
o Tests for ordinal data do not make any assumptions regarding the form of the
distribution of the variables, since the scores are just ranks scores
The Mann-Whitney U test
This is an alternative for the independent-samples t-test

 Recall the independent-samples t-test


o Test the difference between two groups
o The groups are independent
o The dependent variable is interval/ratio variable
 We use the Mann-Whitney U test
o Assume the same conditions
o But the dependent variable is ordinal (rank scores)

Null hypothesis; H0 there is no difference in the rank scores between the groups

Alternative hypothesis; H1 there is a difference or rank sore of group 1 is larger (smaller) than group
2
The Kruskas-Wallis H test
This is an alternative for ANOVA

 Recall ANOVA
o Test the difference of means between groups when there are more than two groups
o The goups are independent
o The dependent variable is interval/ratio variable
 We use the Kruskas-Wallis H test
o Assume the same condictions
o But, the dependent variable is ordinal (rank scores)

Null hypothesis; H0 there is no difference in means of rank scores between the groups

Alternative hypothesis; H1 there is a difference in means of rank scores between the groups

So like in ANOVA, there is no direction in H1, just a difference


The Wilcoxon T-test
This is an alternative for the paired samples t-test

 Recall the paired samples t-test


o Test the difference in means between two variables for a same group OR
o Test the difference in means between two groups where each person in group 1 is
paired with a person in group 2
o The dependent variable is interval/ratio variable
 We use the Wilcoxon T test instead of the paired samples t-test
o The dependent variable is ordinal (rank scores)
The Spearman correlation
This is an alternative for the Pearson correlation (= the correlation we have considered so far)

 Recall Pearson correlation


o Measures the strength and direction of the relation between two interval/ratio
variables
 We use Spearman instead of the Pearson when
o One or bother of the variables is an ORDINAL variable (rank scores)
o Bother are interval/ratio variables but the distribution of one or both deviates
strongly from the normal distribution so that we cannot use Pearson
 When a variable is of interval/ratio scale and we want to use Spearman we first needed to
convert the scores to rank scores
Advantages and disadvantages of non-parametric methods
 Advantages
o the non-parametric tests do not make any assumptions regarding the distributions
of the variables
o Therefore, they are always safe to use- they can always be applied
 Disadvantage
o Non-parametric test are less sensitive to small differences between variables
o Hence, it is harder to find a significant difference while a difference exists in the
population
o For that reason we say that a non-parametric test has less power

Conclusion

 Use a non-parametric test only when a parametric test cannot be used because assumptions
are not met
 Use a non-parametric test when
o The original variables are ordinal/nominal
o The distribution of original variables are not normal
o The sample size is too small for a parametric test, thus when 10<N<30

You might also like