Part 3 copy PDF - Nonparametric Tests: Chi-Square Tests
Document Details
![BeneficialDallas1114](https://quizgecko.com/images/avatars/avatar-12.webp)
Uploaded by BeneficialDallas1114
Erasmus University Rotterdam
Tags
Summary
This document discusses non-parametric tests, specifically chi-square tests. It explains how these tests are used for hypothesis testing on nominal and ordinal data, as well as the concept of a chi-square goodness-of-fit test. It details the steps for conducting the tests and interpreting the results.
Full Transcript
In blue or highlighted: what was said or emphasized by the lecturers Chapter 17 – Nonparametric tests: Chi-square tests ordinal/nominal level data à non-parametric tests o Parametric tests = hypothesis tests that are used to test hypotheses about pa...
In blue or highlighted: what was said or emphasized by the lecturers Chapter 17 – Nonparametric tests: Chi-square tests ordinal/nominal level data à non-parametric tests o Parametric tests = hypothesis tests that are used to test hypotheses about parameters in a population in which the data are normally distributed and measures on an interval or ratio scale o Nonparametric tests = hypothesis tests that are used (1) to test hypotheses that do not make inferences about parameters in a population, (2) to test hypotheses about data that can have any type of distribution, and (3) to analyze data on a nominal or ordinal scale of measurement § E.g.: a research in which we count the number of participants or items in two or more categories § The variance can only meaningfully convey differences when data are measured on a scale in which the distance that scores deviate from their mean is meaningful à does not happen on nominal or ordinal scales § Nonparametric tests do not require that the data in the population be normally distributed 2 Chi-square (x ) test = statistical procedure used to test hypotheses about the discrepancy between the observed and expected frequencies for the levels of a single categorical variable or two categorical variables observed together Chi-square goodness-of-fit-test Chi-Square goodness-of-fit-test = used to determine whether observed frequencies at each level of one categorical variable are similar to or expected at each level of the categorical variable o used to test the H0 that an ordinal/nominal variable has a certain distribution in the population (e.g. equal amount of men and women in the population, or 10% men/90% women in the population) The frequency observed (fo) is the count or frequency of participants recorded in each category or at each level of the categorical variable. The frequency expected (fe) is the count or frequency of participants in each category, or at each level of the categorical variable, as determined by the proportion expected in each category o Multiply the total number of participants (N) by the proportion expected in each category (p) à fe = Np H0 = in the population, (state observed frequencies) 80% are satisfied, 10% are not satisfied and 10% have no opinion H1 = in the population, it is not true that (state observed frequencies) 80% are satisfied, 10% are not satisfied and 10% have no opinion The test statistic measures the size of the discrepancy between an observed and expected frequency at each level of a categorical variable. The larger the difference between the empirically observed frequencies fo (from sample) and the expected frequencies fe (that we would expect if H0 is true), the smaller the probability the H0 is true In blue or highlighted: what was said or emphasized by the lecturers ([ã F[â )J o ì]^_ / = Σ [â The degrees of freedom for each chi-square distribution are equal to the number of levels of the categorical level (k) minus 1 à df = k – 1 The critical values of a chi-square test increases as the number of levels of the categorical variable (k) increases (as the df increases, the critical value also increases) Chi-square distribution = positively skewed-distribution of chi-square values for all possible samples when the H0 is true. The rejection region is always placed in the upper tail of the positively skewed chi-square distribution Hypothesis testing for goodness of fit We compare the value of the test statistic with the critical value. If the test statistic falls beyond the critical value, then we reject the null hypothesis Conclusion (example if retaining H0): a chi-square goodness-of-fit test showed that the frequency of..... was similar to what was expected (state numerical results of chi-square and p). Interpreting the chi-square goodness-of-fit test Interpreting a significant chi-square goodness-of-fit test o Compare observed and expected frequencies at each level of the categorical variable (k comparisons), because this is how the test statistic measured the discrepancies o It cannot be interpreted in terms of differences between categories Using the chi-square goodness-of-fit test to support the null hypothesis A decision to retain the H0 is the goal of the hypothesis test There’s no reason to think H0 will not be true, based on previous research Independent observations and expected frequency size The observed frequencies are recorded independently, meaning that each observed frequency must come from different and unrelated participants The Chi-Square test for independence Chi-Square test for independence = used to determine whether frequencies observed at the combination of levels of two categorical variables are similar to frequencies expected; used to test the H0 that two ordinal/nominal variables are not related to each other in the population (e.g. religion and nationality are not related) H0 = there is no relationship between the two variables in the population H1 = there is a relationship between the two variables in the population To find the expected frequencies if the row and column totals are equal, we divide the total number of participants observed (N) by the number of cells to find the expected frequency in each cell. The expected frequencies in each cell will also be equal To find the expected frequencies if the row and column totals are not equal: In blue or highlighted: what was said or emphasized by the lecturers Y;5 =;=34 + Ç;4î02 =;=34 hb = Q The test statistic is the same as the one for a chi-square goodness-of-fit test Degrees of freedom à df = (number of rows – 1) x (number of columns – 1) Hypothesis testing for independence We compare the value of the test statistic to the critical value. If the test statistic falls beyond the critical value, then we reject the null hypothesis; otherwise, we retain the null hypothesis If X2obtained < X2critical à retain H0 / If X2obtained > X2critical à reject H0 If p-value of Chi-Square is smaller than alpha à reject H0 Conclusion (example if rejecting H0): A chi-square test for independence showed a significant relationship between...; (state numerical results of chi- square and p). The data indicate... is associated with... Chi-square (both) Steps in significance testing: 1. Formulate H0 and H1 a. For both Chi-Square tests, H1 is always non-directional b. H0 = no relationship between two categories c. H1 = there is a relationship 2. Calculate test statistic a. In order to calculate Chi Square, we need to construct a fe table and ([ãF[â )J apply the results to the formula + / = Σ [â 3. Find appropriate critical value (given alpha and df) a. For the Chi Square test for independence, the df is: df = (number of rows – 1) x (number of columns – 1) b. For the Chi Square goodness-pf-fit test, the df is: df = k – 1 4. Compare obtained and critical value and decide whether to reject H0 a. obtained > critical à reject H0 In blue or highlighted: what was said or emphasized by the lecturers Important concepts – what was highlighted and revised in the lecture Types of statistics (lecture 1) Descriptive & inferential Uni-, bi-, & multivariate Types of variables (lecture 1) Continuous & discrete Levels of measurement: interval/ratio, ordinal, nominal Univariate description of distributions (lecture 1) Measures of CT: mode, median & mean Calculation of Sum of Squares Bivariate statistics (lecture 2) Scatter plot Pearson’s r Key concepts inferential statistics Population = the group about which we want to generalize (not necessarily people) Sample = a set of cases from the population that is selected to be studied Sample design = the procedure used to select the cases for the sample Sampling bias / non-response bias = a bias in the sample, caused by a flawed sampling procedure; the sampling is not representative of the population Sampling error = a deviation of a sample characteristics (e.g. the mean of a variable) from what actually exists in the population (not due to sampling bias) o We always have to assume a certain degree of sample error (unless the population is as large as the sample) o Inferential statistics gives us the tools to deal with this uncertainty Tests of statistical significance = statistical techniques that help us to decide to what extent findings from the sample can be generalized to the population Sample Population Mean M " Variance s2 K/ Standard deviation s K Size n N Key concepts: normal distribution In inferential statistics, we typically assume our (interval/ratio) variables to be “normally distributed” meaning o Unimodal (one mode peak only) o Symmetric (mean = median = mode; just as many cases above the mean as below the mean) o Asymptotic to x-axis (the curve never reaches the x-axis) In blue or highlighted: what was said or emphasized by the lecturers o Theoretical More bivariate statistics: crosstables = corsstabs = contingency tables (not in the book) Independent variable = variable that we expect to influence another variable in the model (x) Dependent variable = variable that we expect to be influenced by at least one (independent) variable in the model (y) Nominal and ordinal variables Crosstables = table that depicts a possible relationship between an independent and a dependent variable What does this table tell us about the relationship between the two variables? Use percentage! When calculating the percentages of the column totals, we always compare percentages horizontally To determine the relationship in a crosstab: o Put the independent variable in the columns and the dependent variables in rows o Calculate percentages of columns for easy interpretation o Compare percentages horizontally within the categories of the dependent variable In SPSS: tutorial 3 o Is there a difference in general subjective health between men and woman? § Gender = independent health / healthy perception = dependent o Analyze o Descriptive statistics o Crosstabs o Put dependent variable in the row and independent variable in the column o Cells § Always column percentage Steps in significance testing Formulate H0 and H1 (directional or nondirectional H1) Determine level of significance (default: alpha 0.05) Calculate the test statistic (obtained) o One-sample z-test if we know SD of the population o One-sample t-test if SD of the population in unknown Find appropriate critical value of test statistic at the 0.05 level in table Compare obtained statistic with critical value: if obtained statistic < critical value retain H0 Even if this step rejects H0, confirm that sign of obtained value supports the H1 when directional State your conclusion referring to the population and as detailed as possible: mean, context P-value In blue or highlighted: what was said or emphasized by the lecturers When the proportion of the distribution beyond the sample mean in the tail (p- value) is small, then the t-value is high o When p is low H0 has to go o Remember what to do with p-value in SPSS for directional H1 à divide by 2 before comparing to alpha ns (not significant) or p ≥ 0.05 Ways to remember rejection of H0/acceptance of H1 z-test: Zobtained > Zcritical t-test: Tobtained > Tcritical t-test on SPSS: p-value < alpha à when p is low, H0 has to go The differences and similarities between z Test and t Test z Test t Test What is the obtained Z statistic, p value T statistic, p value value? What distribution is used Normal distribution T distribution to locate the probability of obtaining a sample mean? What is the denominator Standard error Estimated standard error of the test statistic? Do we know the Yes No. The sample variance is population variance? - used to estimate the standard deviation population variance Are df required? No, because the Yes. df = n-1 population variance is known What does the test The probability of The probability of measure? obtaining a measured obtaining a measured sample outcome sample outcome What can be inferred from Whether H0 should be Whether H0 should be the test? retained or rejected retained or rejected The characteristics of hypothesis testing and estimation Significance testing Point/interval estimation Do we know the Yes. It is stated in the H0 No, we are trying to population mean? estimate it What is the process used The likelihood of obtaining The value of a population to determine? a sample mean mean What is learned? Whether the population The range of values within mean is likely to be which the population correct mean is likely to be contained What is our decision? To retain or reject H0 The population mean is estimated – there is no decision per se In blue or highlighted: what was said or emphasized by the lecturers Questions about the proportion of cases in a population that have a value below/above/between given values: z-transformation and z-table +−" R= K Questions about proportion of sample means from a population, that falls below/above/between a given mean value(s): z-transformation and z-table (−" R= K √2 Hypothesis testing (inferential statistics) o H0: the population mean has certain value (K known = one-sample z- test / K unknown = one sample t-test) o H0: The population means of two groups are equal (two-sample t-test – in SPSS – Levine’s) o H0: the population means of more than two groups are equal (ANOVA – F-test – in SPSS) o H0: the ordinal/nominal variable has a certain distribution in population (Chi-square test for goodness of fit) o H0: two ordinal/nominal variables are not related to each other in population (Chi-square test for independence) Estimating confidence intervals for population mean S Use z-formula if K known: " = ( ± R( ) √) ˆS Use t-formula if K unknown: " = ( ± =( ) √) ANOVA The F-test is the main test of significance of the ANOVA It is used to compare the means of more than two groups The H0 of the F-test states that all population group means are equal o H1 is always nondirectional here If we reject H0 we need to look at the post hoc test (Scheffe) to determine which group means differ significantly from each other and how The value of the f test in an ANOVA is dependent on the variance between group means and the variance within groups The f value obtained gets larger making it easier to reject H0 o When group means differ a lot from each other (large variance between groups o When the variances within groups are small (small variance within groups) Things you should know about regression analysis We use regression analysis in situations where we want to test a causal model with one or more IVs and one DV, all measured on interval/ratio level R2 tells us the proportion of the variance in the DV that can be explained by the model (i.e. by the IV(s)) o R2 is dependent on the amount of total variance SST and the amount of variance that is explained by the model SSM In blue or highlighted: what was said or emphasized by the lecturers The intercept (constant in SPSS) tells us the predicted value of the DV when all IVs are zero The unstandardized coefficients tell us the change in the predicted value of the DV when the given IV increases by one unit, with the effect of the other IVs held constant The standardized coefficients are used to compare/make statements about the strength of effects (standardized as it lies -1 and 1, for simple regression) One F-test is calculated for the model as a whole (H0: in the population, R2 = 0; cannot be predicted by ) One t-test is calculated for each individual IV (H0: in the population, the effect of is zero) Regression analysis is based on a number of assumptions, whose violations can lead to false conclusions about the sample data and the population (e.g.: type II errors) General assumption & outlook For all covered tests, we assume our sample to be drawn randomly (simple random samples) For all covered parametric tests o we assume the dependent variable to be measured on interval/ration level o we assume the variables to be normally distributed. However, this normality assumption may be relaxed in situations with large n SPSS Altering dataset o Select casas (data – select cases) o Recode into different variable (transform – record into different variable) o Compute variable Visualizing the data set o Frequency tables (with bar charts) (analyze – descriptive statistics – frequencies) o Scaterplots (graphs – legacy dialogs – scatter/dot) Testing the data-set o Calculate Pearson’s r (analyze – correlate – bivariate) o Calculate crosstabs (analyze – descriptive statistics – crosstabs) o One-sample t-test (analyze – compare means – one-sample t-test) o Chi-square goodness-of-fit (analyze – nonparametric tests – legacy dialogs – chi-square) o Two-sample t-test (analyze – compare means – independent samples t- test) ANOVA o Analyze – compare means – one-way ANOVA § Factor = independent variable o Post hoc – Scheffe o Options – descriptive Regression analysis In blue or highlighted: what was said or emphasized by the lecturers o We use it in situations where we want to test a causal model with one or more IVs and one DV, all measured on interval/ratio level o R2 tells us the proportion of the variance in the DV that can be explained by the model (by the IVs). Concept behind formula. o The intercept (constant) tells us the predicted value of the DV when all IVs are zero o The unstandardized coefficients (slope) tell us the change in the predicted value of the DV when the given IV increases by one unit, with the effects of the other IVs held constant o The standardized coefficients are used to compare/make statements about the strength of effects o One F-test is calculated for the model as a whole (H0: in the population, the R2 = 0, the IVs are not useful predicting the DV) o One t-test is calculated for each individual IV (H0: in the population, the effect of that IV is zero) o Regression analysis is based on a number of assumptions, whose violations can lead to false conclusions § Linearity = linear relationship § Lack of multicollinearity = they should be no strong linear relationship between any two IVs. No IVs should correlate stronger than r=0.80 Diagnostics available in SPSS that test for multicollinearity Multicollinearity can lead to inflated p-values of t-test (type 2 error); underestimation of R2; unreliable coefficients § Homoscedasticity = we assume the variances of the residuals to be constant for all values of the IVs (residuals = distance between points and the linear regression line) The accuracy of our predictions should nor depend on the value of one or more IVs o Interaction effects: the effect that one IV has on the DV, is dependent on other IV