Multiple Linear Regression in SPSS

This tutorial shows how to do multiple linear regression in SPSS. Different from simple linear regression, multiple linear regression has more than 2 or more independent variables (i.e., multiple Xs). In this tutorial, we test if students’ writing scores and math scores can be used to predict reading scores. Read = b0 + b1 Write + b2 Math … Read more

Simple Linear Regression in SPSS

This tutorial shows how to do simple linear regression in SPSS step by step. Simple linear regression estimates the linear relationship between one independent variable and one dependent. In this tutorial, we test whether students’ writing scores can be used to predict reading scores. Read = b0 + b1 Write This dataset in this tutorial … Read more

How to Add Label Values via SPSS Syntax

This tutorial shows how to add label values via SPSS syntax. Such label values can tell readers what these numbers actually represent. In SPSS, you can use the menu to add label values (see the window below). However, you can also achieve the same results by using syntax. Add Label Values via SPSS Syntax The … Read more

Two-Way ANOVA in SPSS

This tutorial shows the steps of how you can do two-way ANOVA in SPSS. A two-way ANOVA is used to estimate how a quantitative variable (i.e., Y) changes according to the levels of two categorical variables (X1 and X2). This tutorial uses hypothetical data of brand (X1) and City (X2) and sales as Y. You can download … Read more

One-Way ANOVA in SPSS

This tutorial shows steps of how you can do One-Way ANOVA in SPSS. One-way ANOVA compares the means of two or more independent groups to determine whether the means are significantly different. We are going to test whether students of different programs (i.e., vocation, general, and academic) differ in writing scores. Thus, in this example, … Read more

One Sample t-test in SPSS

This tutorial shows how you can do one sample t-test in SPSS. One sample t-test is to compare a sample to a fixed value. For instance, you can compare whether the average score of students’ reading is different from 45. In the following, I am going to show how you can do that in SPSS. … Read more

Paired t-test in SPSS

This tutorial shows how you can conduct paired t-test in SPSS. The following shows the specific steps with screenshots from SPSS. We are going to test whether students’ writing scores and reading scores are different. You can download the data here. Steps of Paired t-test in SPSS Step 1: Click “Paired Sample T-Test” Click “Analyze”, … Read more

Two Sample t-test in R (2 Examples)

This tutorial shows how you can two sample t-test in R. Note that, Two sample t-test is also called independent sample t-test or unpaired sample t-test.  Method 1: Vector format t.test(vector_1, vector_2, var.equal = TRUE) Method 2: Data frame format t.test(Y ~ group, data = df_name , var.equal = TRUE) Data and Hypothesis Suppose you … Read more

Categories R

One Sample t-test in R

The following is the core R syntax to do one sample t-test in R. In particular, Method 1 uses built-in R function, whereas method 2 writes the function to test one sample t-test in R from scratch. Method 1: t.test(vector_name, mu = value_to_compare, alternative = “two.sided”) Method 2: (mean(vector_name)-value_to_compare)/(sd(vector_name)/sqrt(number_of_observation)) Data Example for One Sample t-test … Read more

One sample t-test: Definition, Formula, and Examples

This tutorial provides the definition of one sample t-test, the formulas of one sample t-test, examples of manual calculation. Definition and examples of One sample t-test One sample t-test is used to determine whether a mean is different from a specific value. You can calculate a mean based on a sample and compare whether the … Read more