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

Convert Dataframe Columns to Vectors in R (2 Examples)

This tutorial shows how you can convert dataframe columns to vectors in R with examples. The following shows the two methods to do it. Method 1: vector<-df$column Method 2: vector<-df[ , ‘column’] Examples of Convert Dataframe columns to Vectors in R Example 1 (Method 1) The following is the R code to read a CSV … Read more

Categories R

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

Independent t-test in SPSS

This tutorial shows how you can conduct an independent t-test in SPSS. Note that, independent (sample) t-test is also called two sample t-test. It deals with situations where X1 and X2 are from two different groups of people or objects. For instance, in this tutorial, we are going to compare how female students differ from male students in writing scores. … Read more

Johnson Neyman in R (2 detailed examples)

This tutorial explains how you can do Johnson Neyman in R. You can use the package of “interactions” in R do Johnson Neyman in R. The following is the key R syntax. library(interactions) model <- lm(Y ~ X * M, data = data_file_name) johnson_neyman(model = model, pred = X, modx = M) The meaning of … Read more

Categories R