Basic Course in Statistics REINHARD TOLKEN Introduction What will be covered in this course: Variables and Constants Levels of measurement Samples and Populations Data Preparation Data Transformation Codebook Statistics (Descriptives, Inferentials (Parametric & NonParametric))

Creating a Datafile Screening & Cleaning of the data Preliminary Analysis (Including assessing normality) Looking at advanced statistics Some basic concepts Variables and Constants When we are measuring height or weight these can be seen as variables.

The reason is that their measurement can vary from time to time When we deal with a quantity or value that does not change it is referred to as a constant for example the speed of light Variables Important terms regarding variables: Independent Variable (A variable thought to be the cause of some effect)

Dependent Variable (A variable thought to be affected by changes in the independent variable) Predictor Variable (A variable thought to predict an outcome another term for independent variable) Outcome Variable (A variable thought to change as a function of changes in a predictor variable synonymous with dependent variable) Variables Continuous VS Discrete Variables Continuous Variable (Can take any value

in a defined range weight or height as an example) Discrete Variable (These variables can only take certain values example in a race 1st, 2nd and 3rd place can be awarded not 3.25rd or assigning 1 for males and 2 for females there isnt a 1.5 category. Discrete Variables also known as Categorical Variables) Level of Measurement

Nominal (Indicate that there is a difference between categories of objects, persons or characteristics numbers are used here as labels) Cannot do any maths (operations or relations) Example:

Gender (1 = Male, 2 = Female) Psychopathology (1 = Schizophrenic, 2 = Manic Depressive, 3 = Neurotic) Level of Measurement Ordinal (Variables indicate categories that are both different from each other and ranked in terms of the attribute.)

May perform math relations <>, but not math operations (+,-,*,/) Example Race winners 1st, 2nd and 3rd This is an ordinal scale as we dont know how far the

2nd winner was from the 1st Intervals between numbers are meaningless and therefor no maths Level of Measurement Interval (These variables are true quantitative measures the difference/distance between any 2 scores is an accurate reflection of the difference in the amount of an attribute that the two

objects have Example Temperature, IQ scores, scores of attitude, knowledge tests Mathematical relations = <> and math operations +,- can be done

Level of Measurement Ratio (These variables have all the properties of Interval scales but because they have the true zero value *, / can also be done

Example Exam marks 0%-100% Age a 40 years old person is twice the age of a 20 year old Time, length and weight other examples Samples and Populations Population is an entire collection of elements or individuals Example Want to know the average income of all South Africans (The bridge

example) Sample Because it will be physically impossible to collect this data throughout SA, a representative sample of the population should be drawn then to refer the answer back to the population. Data Preparation Data Preparation Before any STATS are done: In the first instance one needs to have a look at the

accuracy of the data The responses readable? All important questions answered? The responses complete? All relevant contextual information included (e.g., data,

time, place, fieldworker)? Secondly transferring the data to a computer programme Data Preparation Programmes that can be utilized: Microsoft Excel Microsoft Access SPSS SAS Get a codebook going write all your codes

that you assign to your measure in the book, e.g. the defining and labeling of variables and assigning numbers to each possible response. Data Preparation variable name variable description variable format (number, data, text) instrument/method of collection date collected respondent or group

variable location notes (Trochim, 2006) Data Transformation When the data have been entered into the appropriate programme then the transformation of the data can begin:

This step could include screening for missing values (thus fields the respondents left out) in some programmes like SPSS defining these values as missing is a must. Item reversals Likert scales Collapsing variables (Strongly agree, Agree recoded into 1 single variable called Agree) Example of a Codebook Variable

(SPSS Variable Name) Identification Number Coding Instruction Number assigned to each survey (ID) Sex (Sex) Marital Status (Marital) 1 = Males

2 = Females 1 = Single 2 = Married 3 = Divorced Scale Question Items 1 to 6 (op1 - op6) 1 = Strongly disagree 5 = Strongly Agree, 6 = Do Not Know

STATISTICS STATISTICS The science of describing and interpreting numerical data in accordance with the theory of probability, and the application of analytical techniques such as significance tests, determination of confidence intervals and parameter estimation to such data. The two major branches of statistics are

descriptive statistics and inferential statistics. (Colman, 2001) STATISTICS Descriptive Statistics: Summaries of numerical data that make them more easily interpretable, including especially the mean, variance, standard deviation, range, standard error of the mean, kurtosis and skewness of a set of scores.

STATISTICS Inferential Statistics: Techniques for inferring conclusions about populations on the basis of data from samples. The major objective is usually to decide whether the results of the research are statistically significant. There are 2 routes one can take with regards to inferential statistics Parametric and Non-Parametric Statistics

STATISTICS Parametric Statistics Most statistical techniques based on this There are also a couple of assumptions that need to be adhered to:

Normally Distributed Data Homogeneity of Variance Interval Data Independence STATISTICS Non-Parametric Statistics Do not have stringent requirements and do not make assumptions about the underlying population distribution

Disadvantage: Less sensitive than the parametric statistics and may fail to detect differences between groups that actually do exist Always try and use Parametric Stats but can be used for Nominal and Ordinal data and also when you have a small sample

Descriptive Statistics Descriptive Statistics Once the data have been prepared and transformed (thus you are sure that there is no errors in your data) one could then go on and do statistics on the available data. Descriptive Statistics There are a number of uses of

descriptive stats: Describing the characteristics of the sample Checking your variables for any violation of the assumptions underlying the statistical techniques To address specific research questions (Pallant, 2007) Descriptive Statistics To get descriptive statistics for categorical

variables (males females) frequencies should be used, this will tell you how many gave a response in these categories. To get descriptive statistics for continuous variables (age) it is better to use descriptive analysis which will then provide a summery of the variables (mean, median and the mode) Descriptive Statistics Univariate analysis is the simplest form of

quantitative (statistical) analysis. The analysis is carried out with the description of a single variable in terms of the applicable unit of analysis. For example, if the variable "age" was the subject of the analysis, the researcher would look at how many subjects fall into given age attribute categories. Univariate analysis contrasts with bivariate analysis the analysis of two variables simultaneously or multivariable analysis the analysis of multiple variables simultaneously. Univariate analysis is commonly used in the first, descriptive stages of research, before being supplemented by more advanced, inferential bivariate or multivariate analysis.

Descriptive Statistics Univariate analysis: Involves the analysis of one variable across cases one variable at a time 3 major characteristics Distribution Central Tendency Dispersion Descriptive Statistics Univariate Analysis The Distribution:

The distribution is a summary of the frequency of individual values or ranges of values for a variable E.g. The percentage distribution of students by their year of study 1st years 2nd years etc. Or age / race / gender / income percentage wise Descriptive Statistics Univariate Analysis Descriptive Statistics Univariate Analysis Central Tendency The middle or typical value of any probability distribution or set of scores usually measured by

the mean, mode and median Mean (Average) the most commonly used method of describing the central tendency sum the values divide by the amount of instances. Median (middle score) the score found in the exact middle 1, 2, 3, 4, 5 median is 3 Descriptive Statistics Univariate Analysis Mode (frequently occur) the most frequently occurring score scores arranged

in order count the scores and the most frequently occurring score is the mode. 1,2,2,2,3,4,4,4,4,5,6 mode is 4 Descriptive Statistics Univariate Analysis Dispersion refer to the spread of values around the central tendency.

Range take highest value and subtract it by the lowest value 42- 10 = 32 Standard Deviation is a more accurate and detailed estimate of dispersion because an outlier can greatly amplify the range Descriptive Statistics Univariate Analysis Deviance (Back to bridge analogy) Descriptive Statistics Univariate Analysis

Degrees of freedom Sport example Descriptive Statistics Univariate Analysis Standard deviation Descriptive Statistics Univariate Analysis Creating a Datafile Creating a Datafile

Step 1: Check and modify the options in SPSS to display the output that is produced Step 2: Structure the datafile by defining the variables (Will demonstrate in SPSS) Step 3: Enter the data from each participant (Will demonstrate in SPSS) Screening and Cleaning of the data Human error can slip in when capturing the data in SPSS, for example typing 35 instead

of 3 this may distort and negatively influence the outcome Step1: Checking for errors Step 2: Finding and correcting that error in the file Screening and Cleaning of the data Step1: Checking for errors

Very important to correct any errors For Categorical Variables Frequencies should be used (Sex, marital status, education level) Screening and Cleaning of the data Step1: Checking for errors

Very important to correct any errors For Continuous Variables Descriptives should be used (Age) Screening and Cleaning of the data Step 2: Finding and correcting that error in the file

There are 2 methods in correcting errors Method 1: In the Data View Tab select the column and sort Ascending or Descending Method 2: Go to the relevant column highlight it, go to Edit and click on the Find function and correct the particular instance Preliminary Analysis Descriptive Statistics - Categorical This is more or less

the same as done in the screening part of analysing the data but how do one write up the findings? From the above we know there are 46 males (17.5 per cent) and 217 females (82.5 per cent)

Preliminary Analysis Descriptive Statistics Continuous The variable age we have information from 248 respondents, ranging in age from 19 to 79 years, with a mean of 29.69 and a standard deviation of 13.65 Descriptive provide info concerning the distribution of the scores on continuous var (skewness and kurtosis) Skewness indicates the symmetry of the distribution Positive clusters to the left side, negative clusters to the right side

Kurtosis indicates the peakedness of the distribution Positive then it is peaked, below 0 then it is relatively flat Preliminary Analysis Descriptive Statistics Skewness / Kurtosis Preliminary Analysis Descriptive Statistics Missing Data Missing data can have a great influence on the statistical results, there are however a couple of things on can do to minimize it

With any analysis being run you can decide if you want to include or exclude missing data via the OPTIONS button these include: Exclude cases listwise this option will only included cases if they have full data on all of the variables listed in the Variables box, this can limit the sample size drastically

Exclude cases pairwise excludes only the case (person) if the data is missing for that particular analysis but would still be included for other analysis Replace with mean this option calculates the mean value of the variables and gives ever case this value DO NOT USE THIS OPTION Preliminary Analysis Assessing Normality Many of the statistical techniques assume that the distribution of scores on the dependent variable is normal Normal is used to describe a symmetrical,

bell-shaped curve A non-significant (Sig value of .05) indicates normality, Sig value of .000 suggest that assumption of normality has been violated but this is common in large samples Statistical techniques are sensitive to Outliers Preliminary Analysis Assessing Normality Preliminary Analysis Assessing Normality boxplot

Different Statistical Techniques Exploring Relationships: Looking at the strength of the relationship between variables Correlation: Using Pearson or Spearman Correlation to explore the strength of the relationship between 2 continuous variables. This gives the indication of the direction (pos / neg) and the strength of the relationship. A pos correlation indicate as one

increase the other increase as well. Neg correlation one increase the other decrease. Different Statistical Techniques Partial Correlation Is an extension of Pearson correlation. Confounding variables can be controlled - removing the variable (e.g. socially desirable responses) to get a more accurate view of the relationship between the 2 variables investigated. Different Statistical Techniques

Multiple Regression A more sophisticated extension of correlation Used when you want to explore the predictive ability of a set of independent variables on a continuous dependant variable. Different Statistical Techniques Factor Analysis Factor analysis allows one to condense a large amount of variables or scale items (questions in a questionnaire) to a smaller more manageable set of factors.

This is done by summarising the underlying pattern of correlations and looking for groups of closely related items. Normally used to identify underlying structures when scales and measures are being developed. Different Statistical Techniques Other techniques include: Discriminant function analysis explore predictive ability of a set of independent variables on one categorical dependent measure. Dependent variable has a clear criterion passed/failed etc.

Canonical correlation when one wants to analyse the relationship between 2 sets of variables (a variety demographic variables relate to a measure of wellbeing and adjustment) Different Statistical Techniques Structural equation modelling Sophisticated technique that allows one to test various models concerning the inter-relationships among a set of variables. Based on multiple regression and factor analysis allows one to evaluate the importance of each independent variable in the

model and then test the fit of the model to the data Different Statistical Techniques Between Groups T-tests

Are used when one has 2 groups (males & females) or experimental (before and after groups) 2 Main types of t-tests Paired samples t-test (repeated measures) Independent samples t-test Non-parametric alternative Mann-Whitney U test and Wilcoxon Signed Rank test Independent-samples T-test For example: Is there a significant difference in the mean self-esteem scores for males and

females? Will tell you whether there is a statistically significant difference in the mean score for the 2 groups Different Statistical Techniques Between Groups One-way analysis of variance (ANOVA) Similar to the t-test but used when there are more than 2 groups and you wish to compare their mean scores on a continuous variable

Called one way looking at the impact of one independent variable on the dependent variable Will let you know whether the groups differ but will not tell you where the significant difference is Different Statistical Techniques Between Groups There are 2 types of one way ANOVAs Repeated measures ANOVA (same people on more than 2 occasions) Between-groups (independent samples) where 2 or more groups means are compared

Non parametric alternative Kruskal-Wallis test and Friedman test Different Statistical Techniques Between Groups Two-way analysis of variance Allow you to test the impact of two independent variables on one dependent variable. Advantage allows to test for interaction effect the effect of one independent variable is influenced by another.

Also tests for main effects the overall main effect of each independent variable (sex, age) Different Statistical Techniques Between Groups There are 2 two-way ANOVAs Between groups ANOVA (when groups are different) Repeated measures ANOVA (Same people tested on more than one time) This design can be mixed Mixed Between-Within Design (Split Plot)

Different Statistical Techniques Between Groups Multivariate analysis of variance (MANOVA) Used when you want to compare the groups on a number of different (related) dependent variables. E.g. anxiety, depression, physical symptoms. Can be used with a one-way, two-way or higher factorial designs where one, two or more independent variables are involved MANOVA Why not do couple of ANOVAs for each

dependent variable? Well running lots of analysis might produce significant results where in fact there may not be any significant results between the groups (Called inflated Type1 error) Has a number of additional assumption that needs to be met. MANOVA Example: Do males and females differ in their

mental health? Is there a difference in the adjustment between males and females with regards to their positive and negative mood states and their levels of perceived stress? One-way ANOVA One categorical independent var (e.g. sex) Two or more continuous var (e.g. perceived stress, positive affect)

Different Statistical Techniques Between Groups Analysis of covariance (ANCOVA) Used when you want to control for possible effects of additional confounding variables Useful when you suspect that the groups differ on some variable that may influence the effect that the independent variable have on the dependent variable. To be sure that it is the independent variable that influences ANCOVA statistically removes the effects of the covariate can be done one-way, two way or multiple methods

Decisions-Decisions According to Pallant (2007) there are a variety of choices one can make with regards to choosing the right statistical technique to analyse ones data. These can include the type of questions one wants to address, items and scaling included in the questionnaire, nature of the data etc.

Decisions-Decisions 1 What questions do you want to address? Get a list in order of questions you would like answers for out of the research conducted different questions would entail different statistical techniques Also depends on the type of data you collected and the number of questions Decisions-Decisions 2 Question and scale items The type of questions asked and the type of items

utilized will impact the statistical techniques used Thus it would be wise to think about the stats that will be used in the study when still in the initial beginning or designing stage For example the way in which you collect age from the participants. (under 30/above 30) or indicate your age. Decisions-Decisions 3 Identify the nature of each variable Identify whether each of your variables is an independent variable or dependent variable not from

the data but from your understanding of the topic area, theories and prior research Level of measurement is also important to know for each of the variables, different stats are needed for categorical and continuous variables Decisions-Decisions Variables:

Categorical (nominal data e.g. sex male/female) Ordinal (ranking 1st, 2nd, 3rd ) Continuous (interval level, age in years or scores on a likert scale for example) Can collapse continuous variables into smaller number of categories Decisions-Decisions 4 Draw diagrams for the research questions

Decisions-Decisions 5 Decide whether parametric or non- parametric statistics will be utilized Statistical techniques are divided into two main categories parametric and non-parametric Parametric stats the more powerful stats but the assumptions are more strict for example the

populations scores are assumed to be normally distributed each technique have their own added assumptions Decisions-Decisions Non-parametric this type of stats are not that strict with their assumptions as is the case of the parametric stats. They have assumptions however. If I do not meet the assumptions what then

There are options one can take You can use the parametric stats anyway hope that it does not invalidate the findings Manipulate the data to be a normal distribution Use non-parametric stats but not as powerful as parametric stats

Decisions-Decisions 6 Final decision Once all of the above have been looked at you are confident about how to precede further then you may go ahead with the analysis. Also read up as much as you can about the statistical methods as possible, would give you a clear idea how to analyze and interpret the output Bibliography Pallant, J. (2010) SPSS Survival Manual (4th

ed.). Open University Press:New York Tredoux, C., & Durheim, K. (2005) Numbers, Hypotheses & Conclusions: A course in statistics for the social sciences. UCT Press: Cape Town Field, A (2009) Discovering Statistics Using SPSS (3rd ed.), SAGE: London Evans, R.E. (2010) Statistics, Data Analysis, and Decision Modelling (4th ed.), Pearson:New Jersey