You are on page 1of 116

The JASP Workbook

An Introduction to Quantitative Analysis

Christopher P. Halter
Creative Commons 2020 by Christopher P. Halter
This work is licensed under a Creative Commons Attribution 4.0 International License.

Cover art created by Gerd Altmann and StockSnap


Image available at Pixabay.com under the Simplified Pixabay License

Print ISBN: 9798612906285


Print version available at Amazon.com
2021 Updated Content

The above work is licensed under a Creative Commons Attribution - NonCommercial 2.5 License.
https://xkcd.com/892/
Table of Contents
THE JASP WORKBOOK INTRODUCTION 1
THE DATA LIBRARY 1
Boxplots 2
DATASETS USED IN THIS WORKBOOK 3
DESCRIPTIVES 9
OVERVIEW OF DESCRIPTIVE ANALYSIS 9
REFLECT AND REVIEW DESCRIPTIVES: SLEEP STUDY 10
EXPLORATION 1 OF DESCRIPTIVES: EYE MOVEMENTS 11
EXPLORATION 2 OF DESCRIPTIVES: TITANIC 15
T-TEST 17
OVERVIEW OF T-TESTS 17
REFLECT AND REVIEW INDEPENDENT SAMPLES T-TEST: READING 18
EXPLORATION 1 OF INDEPENDENT SAMPLES T-TEST: SLEEP 20
EXPLORATION 2 OF INDEPENDENT SAMPLES T-TEST: COLLEGE SUCCESS 22
REFLECT AND REVIEW PAIRED SAMPLES T-TEST: MOON AND AGGRESSION 24
REFLECT AND REVIEW ONE SAMPLE T-TEST: WEIGHT 26
ANOVA 29
OVERVIEW OF ANALYSIS OF VARIANCE (ANOVA) 29
REFLECT AND REVIEW 1 ANOVA: EYE COLOR 30
REFLECT AND REVIEW 2 ANOVA: PAIN 32
EXPLORATION 1 ANOVA: SINGERS 35
EXPLORATION 2 ANOVA: TITANIC 38
CORRELATION 41
OVERVIEW OF CORRELATION ANALYSIS 41
REFLECT AND REVIEW CORRELATION: EXAM ANXIETY 42
EXPLORATION 1 CORRELATION: ALBUM SALES 44
EXPLORATION 2 CORRELATION: COLLEGE SUCCESS 46
REGRESSION 48
OVERVIEW OF REGRESSION ANALYSIS 48
REFLECT AND REVIEW SIMPLE LINEAR REGRESSION: ALBUM SALES 49
REFLECT AND REVIEW MULTIPLE LINEAR REGRESSION: ALBUM SALES 51
EXPLORATION 1 SIMPLE AND MULTIPLE REGRESSION: AUCTION 53
EXPLORATION 2 SIMPLE AND MULTIPLE REGRESSION: EXAM ANXIETY 56
CORRELATION & REGRESSION DECISION MAKING 59
CHI SQUARE TEST OF INDEPENDENCE 61
OVERVIEW OF CHI SQUARE ANALYSIS 61
REFLECT AND REVIEW CHI SQUARE ANALYSIS: DANCING CATS & DOGS 62
EXPLORATION CHI SQUARE ANALYSIS: HEALTH HABITS 64
BINOMIAL TEST 67
OVERVIEW OF BINOMIAL TEST 67
REFLECT AND REVIEW BINOMIAL TEST: SUN BLOCK 68
EXPLORATION BINOMIAL TEST: DANCING CATS AND DOGS 70
POINT BISERIAL CORRELATION 72
OVERVIEW OF POINT BISERIAL CORRELATION ANALYSIS 72
EXPLORATION 1 POINT BISERIAL CORRELATION: INVISIBILITY CLOAK 73
EXPLORATION 2 POINT BISERIAL CORRELATION: BIGGEST LIAR CONTEST 75
THE JASP WORKBOOK SOLUTIONS 79
The JASP Workbook Introduction
This workbook is designed to take you through the basic process of using JASP for statistical
analysis and the thought process behind making sense of those results. We will be using the
JASP built-in dataset library to explore the basic quantitative analysis techniques available to
the novice researcher. The workbook is intended to be a companion to other reference
material aimed at describing the analysis techniques.

In this workbook our primary goal is to support conceptual understanding. I am


assuming that you are using JASP, the “friendly statistical analysis” software,
because you were not thrilled with the idea of performing a bunch of mathematical
calculations. Afterall, the word “friendly” shows up on the JASP homepage as one
of its descriptors!

For more information about the JASP open-source statistical analysis project, visit their
website.
https://jasp-stats.org/
In this workbook we will focus on conceptual understanding;

a. Knowing how to interpret the results of statistical tests


b. Translating the results of a statistical test into real world meaning (i.e., how would
you explain the results to your mom?)

I could say that this guide would help you gain the skills to explain statistical results to your
dog, but let’s face it, dogs tend to wag their tail and agree with us whether they understand
or not.

The Data Library


The JASP Data Library contains over 50 datasets that are used to highlight particular
statistical techniques. The datasets are organized within the JASP application by these
techniques, such as Descriptives, t-Test, ANOVA, Regression, etc. The organization of the
datasets into these topics does not imply that the dataset can only be used for that specific
techniques. These are just examples.

1
When we select data from the Data Library, JASP will display the dataset with much of the
analysis settings completed. The JASP team also included information, explanations, and
guidance about the data, the settings, and the results.

Below is an example from the “Sleep” study contained in the Descriptives section of the
Library.

Sleep: Descriptives
Description:
This famous data set, "Sleep", provides the number of additional hours that ten patients slept after having been
administered two `soporific drugs' (i.e., sleeping pills). The data set was used both by Student and by Fisher in
seminal articles.

Variables:
• extra - Increase of sleep (in hours) relative to a control drug.
• group - Type of a soporific drug. Note that the data are in long format - each patient has been
administered both soporific drugs and a control drug.
• ID - Participants' identification number.
This example JASP file demonstrates the use of descriptive statistics.

Reference:
Cushny, A. R and Peebles, A. R. (1905). The action of optical isomers. The Journal of Physiology, 32: 501-510.

Descriptive Statistics
First, we will create the descriptive statistics split by the group (type of drug). Then, we create a plot of the data.

Descriptive Statistics
extra
1 2 No
Valid 10 10 by tes
JA pro
Missing 0 0 SP v i
Mean 0.750 2.330 Te ded
am
Std. Deviation 1.789 2.002
Minimum -1.600 -0.100
Maximum 3.700 5.500 Output results
from JASP
Boxplots
extra

2
The workbook will begin with the settings used in the Data Library, asking you to consider,
interpret and make some judgments about the results. You will also be asked to make
changes to these settings to understand how those changes affect the output and the results.

The workbook will also have you open data from other sections of the Library to create your
own analysis that has not been previously performed by the Data Library examples.

Datasets Used in This Workbook


The following data is used in the practice sections throughout this workbook. The data can
be found in the Data Library of JASP. The name of the dataset and the Data Library folder
containing the data are shown here.

Dancing Cats and Dogs (Frequencies)


Description: This fictional data set, "Dancing Cats and Dogs", provides the number of cats and dogs who
learned to dance, trained by one of two types of conditioning.

Variables:
• Animal - Species of animal trained (Cat, Dog).
• Training - Type of conditioning (Food as reward, Affection as reward).
• Dance - Did the animal learn to dance? (Yes, No).

Sleep: (Descriptives)
Description: This famous data set, "Sleep", provides the number of additional hours that ten patients slept after
having been administered two `soporific drugs' (i.e., sleeping pills). The data set was used both by Student and
by Fisher in seminal articles.

Variables:
• extra - Increase of sleep (in hours) relative to a control drug.
• group - Type of a soporific drug. Note that the data are in long format - each patient has been administered both
soporific drugs and a control drug.
• ID - Participants' identification number.

Directed Reading Activities (t-Test)


Description: This data set, "Directed Reading Activities", provides reading performance of two groups of
pupils - one control group and one group that was given Directed Reading Activities (Moore et al, 2012, p.
432).

Variables:
• id - Identification number of a pupil.
• group - Experimental group indicator ('Treatment' = participation in the Directed Reading Activities,
'Control' = Control group).

3
• g - Experimental group indicator expressed as a binary variable (0= Directed Reading Activities, 1=
Control group).
• drp - The performance on Degree of Reading Power test.

In this example JASP file, we will compare two classrooms of students with the aim of testing the null
hypothesis that Directed Reading Activities (only in one of the classes) do not enhance the performance of
pupils on Degree of Reading Power test (DRP).

Moon and Aggression (t-Test)


Description: This data set, "Moon & Aggression", provides the number of disruptive behaviors by dementia
patients during two different phases of the lunar cycle (Moore et al, 2012, p. 410). Each row corresponds to
one participant.

Variables:
• Moon - The average number of disruptive behaviors during full moon days.
• Other - The average number of disruptive behaviors during other days.

This example JASP file demonstrates the use of paired samples t-test. Specifically, we will examine the adequacy
of the null hypothesis which states that the average number of disruptive behaviors among patients with
dementia does not differ between moon days and other days.

Invisibility Cloak (t-Test)


This data set, "Invisibility Cloak", provides the number of mischievous acts committed by two groups of
people, those with and those without and invisibility cloak.

Variables:
• Participant - Identification number of a participant.
• Cloak - Experimental group (0 = without a cloak of invisibility, 1 = with a cloak of invisibility).
• Mischief - the number of mischievous acts committed by a participant.

This example JASP file demonstrates the use of an independent samples t-test. Specifically, we examine the
adequacy of the null hypothesis that the Invisibility Cloak has no effect on the number mischievous acts
committed.

Album Sales (Regression)


Description: This fictional data set, "Album Sales", provides factors that may influence album sales.

Variables:
• adverts - Amount (in thousands of pounds) spent promoting the album before release.
• sales - Sales (in thousands of copies) of each album in the week after release.
• airplay - How many times songs from the album were played on a prominent national radio station in
the week before release.
• attract - How attractive people found the band's image (1 to 10).

4
This example JASP file demonstrates the use of linear regression. First, we will fit a simple model to see
whether the adverts predict album sales. Then, we will test whether adding airplay and attractiveness improves
the predictions of the model.

Auction (Regression)
Description: This data set, "Auction", provides the selling price and age of antique clocks, and the number of
bidders in the auction.

Variables:
• Age - Age of the antique clock.
• Bidders - The number of bidders in the auction.
• Price - The final selling price of the clock.

This example JASP file demonstrates the use of Bayesian linear regression. Specifically, we are interested
whether and to what extent the age of the clocks and the number of bidders in the auction predict the final
selling price.

College Success (Regression)


Description: This data set, "College Success", provides high school grades, SAT scores, and Grade Point
Average of 224 university students.

Variables:
• id - Participant ID.
• gpa - Grade Point Average (GPA) after three semesters in college.
• hsm - Average high-school grade in mathematics.
• hss - Average high-school grade in science.
• hse - Average high-school grade in English.
• satm - SAT score for mathematics.
• satv - SAT score for verbal knowledge.
• sex - Gender (labels not available)

This example JASP file demonstrates the use of linear regression. Specifically, we will examine which variables
best predict GPA. First, we will fit a model predicting GPA by high school grades. Then, we will use a model
that predicts GPA by SAT scores. Finally, we will fit a model that uses both high school grades and SAT scores
to predict GPA.

Pain Thresholds (ANOVA)


Description: This data set, "Pain thresholds", provides pain threshold for people with different hair color.

Variables:
• V1 - Participant number.
• Hair Color - Hair color of the participant (`Light Blond' = light blond, `Dark Blond' = dark blond,
`Light Brunette' = light brunette, `Dark Brunette' = dark brunette).
• Pain Tolerance - Performance on pain sensitivity test (the higher the score, the better the pain
tolerance).

5
This example JASP file demonstrates the use of one-way ANOVA. We will conduct both classical version and
a Bayesian version of the analysis.

Response to Eye Color (ANOVA)


Description: This data set, "Response to Eye Color", provides post-advertisement attitudes towards a brand
expressed by four different groups - each group saw the same advertisement except for the aspect that was
manipulated: the eye-color of the model.

Variables:
• Group - Experimental conditions (`Blue' = Model with blue eyes, `Brown' = Model with brown eyes,
`Green'= Model with green eyes, `Down' = Model's eye color cannot be seen).
• Subj - Participant number.
• Score - An average of 10 survey questions about attitudes towards the brand (7-point Likert scale).
Higher averages correspond to more positive attitudes.

This example JASP file demonstrates the use of one-way ANOVA. Specifically, we assess the adequacy of the
null hypothesis that the attitudes are the same regardless of the eye-color of the model

Singers (ANOVA)
Description: This data set, "Singers", provided "Heights in inches of the singers in the New York Choral
Society in 1979. The data are grouped according to voice part. The vocal range for each voice part increases in
pitch according to the following order: Bass 2, Bass 1, Tenor 2, Tenor 1, Alto 2, Alto 1, Soprano 2, Soprano 1".
Data set included in R

Variables:
• Height - Height (in inches) of the singers.
• Gender - Gender of the singers (female, male).
• Pitch - Voice pitch of the singers (very low, low, high, very high)

This example JASP file demonstrates the use of Bayesian between subjects ANOVA. Specifically, we will test
whether female singers have different height than males and whether the pitch relates to height.

Exam Anxiety (Regression)


Description: This fictional data set, "Exam Anxiety", provides questionnaire scores by students prior to an
exam (the variables are anxiety, preparedness, and grade).

Variables:
• Code - Participant's identification number.
• Revise - Time spent studying for the exam (in hours).
• Exam - Performance in the exam (percentages).
• Anxiety - Anxiety prior to the exam as measured by the Exam Anxiety Questionnaire.
• Gender - Participant's gender (Male, Female).

This example JASP file demonstrates the use of the Pearson correlation coefficient. Specifically, we will
investigate how the three measured variables correlate with each other.

6
Titanic (Regression)
Description: This data set, "Titanic", provides age, cabin class, and survival status of 1313 passengers on the
Titanic.

Variables:
• Name - Name of the passenger.
• PClass - Cabin class of the passenger (1st, 2nd, or 3rd).
• Age - Age of the passenger.
• Sex - Sex of the passenger (female, male).
• Survived - Indicator variable for whether or not the passenger survived (0 = died, 1 = survived).

This example JASP file demonstrates the use of logistic regression. Specifically, we are interested in the extent
to which passenger age and cabin class predict whether or not the passenger survives.

Health Habits (Frequencies)


Description: This data set, "Health Habits", provides physical activity and consumption of fruits of 1184
students.

Variables:
• Physical Activity - Physical activity of the participant (Low, Moderate, Vigorous).
• Fruit Consumption - Participant's consumption of fruits (Low, Medium, High).

This example JASP file demonstrates the use of a Chi-squared test of independence. Specifically, we assess the
adequacy of the null hypothesis that physical activity and fruit consumption are independent.

Horizontal Eye Movements (t-Test)


Description: This data set, "Horizontal Eye Movements", provides the number of recalled words by two
groups of participants - during the retention interval, one group was instructed to fixate on a centrally
presented dot; the other group was instructed to execute horizontal saccades. Specifically, "Participants were
presented with a list of neutral study words for a subsequent free recall test. Prior to recall, participants were
requested to perform - depending on the experimental condition - either horizontal, vertical, or no eye
movements (i.e., looking at a central fixation point). The type of eye movement was thus manipulated between
subjects. As the effect of eye movement on episodic memory has been reported to be influenced by
handedness, we tested only strong right-handed individuals. The dependent variable of interest was the number
of correctly recalled words.'' (Matzke et al, 2015, p. 3) This data set contains only data from participants
assigned to the horizontal and no eye movements condition.

Variables:
• ParticipantNumber - Participant’s identification number.
• Condition - Experimental condition (Fixed = fixed gaze, Horizontal = horizontal eye movements).
• CriticalRecall - The number of Recalled words after the memory retrieval task.

This example JASP file demonstrates the use of a Bayesian independent samples t-test. Specifically, we will
examine whether the data are more likely to occur if horizontal eye movements do not help memory retrieval
(null hypothesis), or if they have a positive effect on the memory retrieval (one-sided alternative hypothesis).

7
Reference:
Matzke, D., Nieuwenhuis, S., van Rijn, H., Slagter, H. A., van der Molen, M. W., and Wagenmakers, E.-J.
(2015). The effect of horizontal eye movements on free recall: A preregistered adversarial collaboration. Journal
of Experimental Psychology: General: 144:e1-e15.

8
Descriptives
Overview of Descriptive Analysis
Descriptive statistics refers to a set of techniques for summarizing and displaying data. Let us
assume here that the data are quantitative and consist of scores on one or more variables for
each of several study participants. Although in most cases the primary research question will
be about one or more statistical relationships between variables, it is also important to
describe each variable individually. For this reason, we begin by looking at some of the most
common techniques for describing single variables.

Key Reminders

• Every variable has a distribution—a way that the scores are distributed across the
levels. The distribution can be described using a frequency table and histogram. It
can also be described in words in terms of its shape, including whether it is unimodal
or bimodal, and whether it is symmetrical or skewed.
• The central tendency, or middle, of a distribution can be described precisely using
three statistics—the mean, median, and mode. The mean is the sum of the scores
divided by the number of scores, the median is the middle score, and the mode is the
most common score.
• The variability, or spread, of a distribution can be described precisely using the range
and standard deviation. The range is the difference between the highest and lowest
scores, and the standard deviation is roughly the average amount by which the scores
differ from the mean.
• The location of a score within its distribution can be described using percentile ranks
or z scores. The percentile rank of a score is the percentage of scores below that
score, and the z score is the difference between the score and the mean divided by
the standard deviation.

9
Reflect and Review Descriptives: Sleep Study
The Sleep Study

Description: This famous data set, "Sleep", provides the number of additional hours that
ten patients slept after having been administered two `soporific drugs' (i.e., sleeping pills).
The data set was used both by Student and by Fisher in seminal articles.

Variables:
• extra - Increase of sleep (in hours) relative to a control drug.
• group - Type of a soporific drug. Note that the data are in long format - each patient has
been administered both soporific drugs and a control drug.
• ID - Participants' identification number.

This example JASP file demonstrates the use of descriptive statistics.

Reference: Cushny, A. R and Peebles, A. R. (1905). The action of optical isomers. The
Journal of Physiology, 32: 501-510.

Here is an overview of the task;


• We will open the data and use the Descriptive Results that are in the file.
• Some additional Statistics settings will be used.
• Some of the Boxplot features will be turned off.

Open the Sleep dataset from the JASP data Library


Data Library > Categories > Descriptives > Sleep

10
1. The Descriptives table displays several measures from the two groups.

a. What can you say about the means of these two groups?

b. Does the Standards Deviation give us any information when comparing these two
groups?

2. Examine the Boxplots. In the plot settings, uncheck both Violin element and Jitter
element, leaving only the Boxplot element checked. What do the boxplots tell you about the
data when comparing the two groups?

3. What is your hypothesis about the Sleep study?

Exploration 1 of Descriptives: Eye Movements


Horizontal Eye Movements

Description: This data set, "Horizontal Eye Movements", provides the number of recalled
words by two groups of participants - during the retention interval, one group was
instructed to fixate on a centrally presented dot; the other group was instructed to execute
horizontal saccades.

Specifically, "Participants were presented with a list of neutral study words for a
subsequent free recall test. Prior to recall, participants were requested to perform -
depending on the experimental condition - either horizontal, vertical, or no eye
movements (i.e., looking at a central fixation point). The type of eye movement was thus
manipulated between subjects. As the effect of eye movement on episodic memory has
been reported to be influenced by handedness, we tested only strong right-handed

11
individuals. The dependent variable of interest was the number of correctly recalled
words.'' (Matzke et al, 2015, p. 3)

This data set contains only data from participants assigned to the horizontal and no eye
movements condition.

Variables:
• ParticipantNumber - Participant’s identification number.
• Condition - Experimental condition (Fixed = fixed gaze, Horizontal = horizontal
eye movements).
• CriticalRecall - The number of Recalled words after the memory retrieval task.

Reference:
Matzke, D., Nieuwenhuis, S., van Rijn, H., Slagter, H. A., van der Molen, M. W., and
Wagenmakers, E.-J. (2015). The effect of horizontal eye movements on free recall: A
preregistered adversarial collaboration. Journal of Experimental Psychology: General: 144:e1-e15.

Here is an overview of the task;


• We will IGNORE the Bayesian Independent Samples t-Test results that are in this file.
• Using the Descriptives tab, we will create a Descriptives Results.
• Some of the Plots will be used.

Open the Eye Movement dataset from the JASP data Library
Data Library > Categories > t-Test > Eye Movements

12
1. The Descriptives table displays several measures from the data.
Move the Critical Recall scores (CriticalRecall) into the Variables window.
For Statistics, check Mean, Median, Maximum, Minimum, Range, and Std.
Deviation.

a. What can you say about the measures of central tendency (mean, median, mode)
of this data?

b. Does the Standards Deviation give us any information when comparing the recall
scores?

2. Examine the Distribution Plot for this data. In the Plots setting, select Distribution Plot.

a. What do you notice about the graph?

b. What questions does this graph bring up about the data?

3. Examine the Boxplots. In the plot settings, check the Boxplot element. Check Label
Outliers.

a. What do the boxplots tell you about the data when looking at the data?

b. Are there any outliers?

13
4. The Descriptives table can display several measures separated by the two groups.
Move the Critical Recall scores (CriticalRecall) into the Variables window and the
Condition variable (Condition) into the Split window.
In the Statistics settings, check Mean, Median, Maximum, Minimum, Range, and
Std. Deviation.

a. What can you say about the measures of central tendency (mean, median, mode)
of these two groups?

b. Does the Standards Deviation give us any information when comparing these two
groups?

5. Examine the Distribution Plot for this data. In the Plots setting, check the Distribution
plot.

a. What do you notice about the two graphs?

b. What questions does this graph bring up about the two groups?

6. Examine the Boxplots. In the plot settings, check the Boxplot element. Check Label
Outliers.

a. What do the boxplots tell you about the data when comparing the two groups?

b. Are there any outliers? What might this mean?

14
7. What is your hypothesis about the Eye Movement study?

Exploration 2 of Descriptives: Titanic


Titanic

Description: This data set, "Titanic", provides age, cabin class, and survival status of 1313
passengers on the Titanic.

Variables:
• Name - Name of the passenger.
• PClass - Cabin class of the passenger (1st, 2nd, or 3rd).
• Age - Age of the passenger.
• Sex - Sex of the passenger (female, male).
• Survived - Indicator variable for whether or not the passenger survived (0 = died,
1 = survived).

Reference:
British Board of Trade (1990). Report on the Loss of the ‘Titanic’ (S.S.). British Board of Trade
Inquiry Report (reprint). Gloucester, UK: Allan Sutton Publishing.

This data set is available in R


(https://stat.ethz.ch/R-manual/R-devel/library/datasets/html/Titanic.html).

Here is an overview of the task;


• We will IGNORE the Logistic Regression results that are in this file.
• Using the Descriptives tab, we will create a Descriptives Results.
• Some of the Plots will be used.

15
Open the Titanic dataset from the JASP data Library
Data Library > Categories > Regression > Titanic

1. Use the Descriptives tab with the Titanic dataset. Explore the variables using the Split
feature; such as Survival Split by Sex and Survival Split by Passenger Class. What do you
notice? Do the Counts reveal any information? What questions do you have?

2. What is your hypothesis about surviving the Titanic disaster?

16
t-Test
Overview of t-Tests
The independent-samples t-test is used to compare the means of two separate samples
(M1 and M2). The two samples might have been tested under different conditions in a
between-subjects experiment, or they could be preexisting groups in a correlational design
(e.g., women and men, extraverts and introverts). The null hypothesis is that the means of
the two populations are the same: µ1 = µ2. The alternative hypothesis is that they are not the
same: µ1 ≠ µ2. Again, the test can be one-tailed if the researcher has good reason to expect
the difference goes in a particular direction.

The one-sample t-test is used to compare a sample mean (M) with a hypothetical
population mean (µ0) that provides some interesting standard of comparison. The null
hypothesis is that the mean for the population (µ) is equal to the hypothetical population
mean: µ = µ0. The alternative hypothesis is that the mean for the population is different
from the hypothetical population mean: µ ≠ µ0. To decide between these two hypotheses,
we need to find the probability of obtaining the sample mean (or one more extreme) if the
null hypothesis were true. But finding this p value requires first computing a test statistic
called t. (A test statistic is a statistic that is computed only to help find the p value.)

The paired-samples t-test is used to compare two means for the same sample tested at two
different times or under two different conditions. This comparison is appropriate for
pretest-posttest designs or within-subjects experiments. The null hypothesis is that the
means at the two times or under the two conditions are the same in the population. The
alternative hypothesis is that they are not the same. This test can also be one-tailed if the
researcher has good reason to expect the difference goes in a particular direction.

Key Reminders

• To compare two means, the most common null hypothesis test is the t-test. The
one-sample t test is used for comparing one sample mean with a hypothetical
population mean of interest, the paired-samples t-test is used to compare two means
within-subjects, and the independent-samples t-test is used to compare two means in
a between-subjects design.

Independent Samples T-Test


Test Statistic df p VS-MPR* Mean Difference SE Difference Cohen's d
drp Student -2.267 42.000 0.014 6.052 -9.954 4.392 -0.684
Welch -2.311 37.855 0.013 6.443 -9.954 4.308 -0.691

17
Reflect and Review Independent Samples t-Test: Reading
Directed Reading Activities

Description: This data set, "Directed Reading Activities", provides reading performance
of two groups of pupils - one control group and one group that was given Directed
Reading Activities (Moore et al, 2012, p. 432).

Variables:
• id - Identification number of a pupil.
• group - Experimental group indicator ('Treatment' = participation in the Directed
Reading Activities, 'Control' = Control group).
• g - Experimental group indicator expressed as a binary variable (0= Directed
Reading Activities, 1= Control group).
• drp - The performance on Degree of Reading Power test.

In this example JASP file, we will compare two classrooms of students with the aim of
testing the null hypothesis that Directed Reading Activities (only in one of the classes) do
not enhance the performance of pupils on Degree of Reading Power test (DRP).

References:
D. S. Moore, G. P. McCabe, and B. A. Craig. (2012). Introduction to the Practice of
Statistics (7th ed.). New York: Freeman.

Schmitt, M. C. (1978). The effects of an elaborated directed reading activity on the meta-
comprehension skills of third graders. PhD thesis, Purdue University.

Here is an overview of the task;


• Open the Directed Reading Activities from the Data Library.
• We will be using the Descriptive and Independent t-test results that have already
been created.
• Answer the questions below.

Open the Directed Reading Activity dataset from the JASP data Library
Data Library > Categories > t-Test > Directed Reading Activities

18
1. Review the Descriptive Analysis for this dataset. Based on these results, what do you
notice about the two reading groups? What is your hypothesis about the effects of the
reading activity on the meta-comprehension skills of these third graders?

2. Review the Assumption checks for the data. Based on these results, should you use the
Student’s t-Test results or the Welch/Mann-Whitney test results? Why?

3. Are the results statistically significant? What evidence from the Results tables supports
this finding?

• H0: There is not a relationship between a third graders Degree of Reading Power test
and their participation in the Directed Reading Activities.
• H1: There is a relationship between a third graders Degree of Reading Power test and
their participation in the Directed Reading Activities.

19
Exploration 1 of Independent Samples t-Test: Sleep
Sleep

Description: This famous data set, "Sleep", provides the number of additional hours that
ten patients slept after having been administered two `soporific drugs' (i.e., sleeping pills).
The data set was used both by Student and by Fisher in seminal articles.

Variables:
• extra - Increase of sleep (in hours) relative to a control drug.
• group - Type of a soporific drug. Note that the data are in long format - each patient has
been administered both soporific drugs and a control drug.
• ID - Participants' identification number.

This example JASP file demonstrates the use of descriptive statistics.

Reference:
Cushny, A. R and Peebles, A. R. (1905). The action of optical isomers. The Journal of
Physiology, 32: 501-510.

Here is an overview of the task;


• Open the Sleep Study from the Data Library
• We will be using the Descriptives Results that have already been created.
• We will create our own Independent t-Test Results.
• The Alternative hypothesis setting will be changed.
• Answer the questions below.

Note: Soporific means a drug or other agent that induces sleep.

Open the Sleep dataset from the JASP data Library


Data Library > Categories > Descriptives > Sleep

20
1. Review the Descriptive analysis for the Sleep study. What do you notice about the data?
Do you have a hypothesis about the effectiveness of the sleep drugs used in the study?

2. Using the Independent Samples t-Test tab;

Move the Extra Sleep variable (extra) into the variables window and the Group
variable (group) into the Grouping Variable.
Select Student’s and Welch test, Effect Size using Cohen’s d, Descriptives, and the
Assumptions Checks for both Normality and Equality of Variance.
Change the Alternative Hypothesis to Group 1 < Group 2.

Based on the Assumptions Check tables, which type of test (Student’s or Welch) would be
appropriate for this data?

3. What is the p-value of the Independent Samples t-Test? Does this result support our
hypothesis that the one of the drugs results in significant increases in sleep time over the
other drug? Are the differences statistically significant? What is the effect size tell us?
Explain.

• H0: There is not a relationship between extra sleep by the participants and the drug
that was used.
• H1: There is a relationship between extra sleep by the participants and the drug that
was used.

4. Change the Alternative hypothesis to Group 1 ≠ Group 2. Is the result statistically


significant? Explain the result.

21
Exploration 2 of Independent Samples t-Test: College Success
College Success

Description: This data set, "College Success", provides high school grades, SAT scores,
and Grade Point Average of 224 university students.

Variables:
• id - Participant ID.
• gpa - Grade Point Average (GPA) after three semesters in college.
• hsm - Average high-school grade in mathematics.
• hss - Average high-school grade in science.
• hse - Average high-school grade in English.
• satm - SAT score for mathematics.
• satv - SAT score for verbal knowledge.
• sex - Gender (labels not available)

Reference:
Moore, D. S., McCabe, G. P., and Craig, B. A. (2012). Introduction to the Practice of
Statistics (7th ed.). New York: Freeman.

Campbell, P. F. and McCabe, G. P. (1984). Predicting the success of freshmen in a


computer science major. Communications of the ACM, 27: 1108–1113.

Here is an overview of the task;


• We will IGNORE the Correlation Matrix and Linear Regression Results that have
been created.
• The Descriptives Results will be modified by using Sex in the Split function.
• An Independent t-Test Results will be created.
• Answer the questions below.

Open the College Success dataset from the JASP data Library
Data Library > Categories > Regression > College Success

22
1. Review the Descriptive analysis for the College Success study. Add “Sex” to the Split
window of the descriptives. What do you notice about the data? Do you have a
hypothesis about college success markers based on the gender of a student? Note that in
this data we do not which gender is identified “1” and which gender is identified as “2”.

2. Let’s create the Independent t-Test for college success using sex as the grouping variable.
Using the Independent Samples t-Test, move the all the success variables (gpa,
hsm, hss, hse, satm, satv) into the variables window and the Gender variable
(sex) into the Grouping Variable.
Select Student’s and Welch test, Effect Size using Cohen’s d, Descriptives, and
the Assumptions Checks for both Normality and Equality of Variance.
The Alternative Hypothesis will be set for Group 1 ≠ Group 2.

• H0: There is not a relationship between measures of college success and on gender (sex).
• H1: There is a relationship between measures of college success and on gender (sex).

a. Based on the Assumptions Check tables, which type of test (Student’s or


Welch) would be appropriate for this data?

b. Are any of the differences statistically significant? Which results sup[port your
findings? What does the effect size tell us about these differences? Does this
result support our hypothesis that there are differences between the genders for
any of these variables?

3. Look at the t-Test descriptives table to find the means for each group in any variables
that are significantly different? Describe these differences.

23
Reflect and Review Paired Samples t-Test: Moon and Aggression
Moon and Aggression

Description: This data set, "Moon & Aggression", provides the number of disruptive
behaviors by dementia patients during two different phases of the lunar cycle (Moore et al,
2012, p. 410). Each row corresponds to one participant.

Variables:
• Moon - The average number of disruptive behaviors during full moon days.
• Other - The average number of disruptive behaviors during other days.

This example JASP file demonstrates the use of paired samples t-test. Specifically, we will
examine the adequacy of the null hypothesis which states that the average number of
disruptive behaviors among patients with dementia does not differ between moon days
and other days.

References:
Moore, D. S., McCabe, G. P., and Craig. B. A. (2012) Introduction to the Practice of
Statistics (7th ed). New York: Freeman.

"These data were collected as part of a larger study of dementia patients conducted by
Nancy Edwards and Alan Beck, Purdue University." (Moore et al, 2012, p. N-8).

Here is an overview for the task;


• Open the Moon & Aggression data from the Data Library
• Create a Descriptive Results table as described in the question below.
• We will be looking at the Paired t-Test results that have already been created.
• In the Paired t-Test settings, check Effect Size.

Open the Moon and Aggression dataset from the JASP data Library
Data Library > Categories > t-Test > Moon and Aggression

24
1. Use the Descriptives Tab to create the descriptive statistics for the data. Move the Moon
variable and the Other variable into the Variables window. In the Plots setting, check the
Distribution plot and the Boxplot with the Boxplot Element.

Review the Descriptive Analysis for this dataset. Based on these results, what do you notice
about the disruptions during a full moon and when there is not a full moon (Other)? What is
your hypothesis about the effects of the full moon on these patients?

2. Review the Results of the paired t-Test. Based on these results, was the Student’s t-Test
results appropriate? Why?

3. What is the p-value for the t-Test? Are the results statistically significant for differences
in disruptive behaviors during a full moon compared to other days? What does the effect
size tell us about this difference? (be sure to check effect size in the settings).

• H0: There is not a relationship between aggression at times of a full moon and other
times of the month.
• H1: There is a relationship between aggression at times of a full moon and other
times of the month.

25
Reflect and Review One Sample t-Test: Weight
Weight Gain

Description: This data set, "Weight Gain", provides weights of 16 participants before and
after an eight-week period of excessive calorie intake (Moore et al., 2012, p. 425).

Variables:
• Weight Before - Weight in pounds (lb) measured before eight weeks of excessive
calorie intake.
• Weight After - Weight in pounds (lb) measured after eight weeks of excessive
calorie intake.
• Difference - Weight After - Weight Before.

This example JASP file demonstrates the use of one sample t-test. We will test the
hypothesis that 1000 excess calorie intake per day over 8 weeks results in 16 pounds
(approximately 7.2 kilograms) weight increase.

References:
Moore, D. S., McCabe, G. P., and Craig, B. A. (2012). Introduction to the Practice of Statistics
(7th ed.). New York: Freeman.

Levine, J. A., Eberhardt, N. L., and Jensen, M. D. (1999) Role of nonexcercise activity
thermogenesis in resistance to fat gain in humans. Science,283:212-214.

Here is an overview of the task;


• Open the Weight Gain data from the Data Library.
• We will use the existing Descriptives and One Sample t-Test with a few
modifications.
• Answer the questions below.

Open the Weight Gain dataset from the JASP data Library
Data Library > Categories > t-Test > Weight Gain

26
1. Review the Descriptive statistics provided in the JASP output window.

a. What do you notice about the mean and the standard deviation? What
implications does this have for our data? What do you expect from the data?

b. In the Plots, select the Distribution with Display Density checked. What
inferences can you make from the graph?

2. Review the One-Sample t-Test.

a. Look at the Assumptions Check table. Was the Student’s t-Test appropriate for this
data? Why?

b.

c. Does the addition of 1000 calories per day to a person’s diet have an association with
weight gain? Is the average weight change difference significantly different than our
assumption of a 16-pound weight increase? What does the effect size suggest about
these results (check Effect Size in the Additional Statistics of the One Sample t-
Test)?

• H0: There is not a relationship between weight gain and the addition of 1000
calories per day to a person’s diet.
• H1: There is a relationship between weight gain and the addition of 1000 calories
per day to a person’s diet.

27
d. Based on this One Sample t-Test, what could you say about the hypothesis that 1000
extra calories per day in a person’s diet is associated with an average of 16 pounds in
weight gain?

28
ANOVA
Overview of Analysis of Variance (ANOVA)
When there are more than two groups or means to be compared, the most common null
hypothesis test is the analysis of variance (ANOVA). In this section, we look primarily at
the one-way ANOVA, which is used for between-subjects designs with a single independent
variable.

The one-way ANOVA is used to compare the means of more than two samples
(M1, M2…MG) in a between-subjects design. The null hypothesis is that all the means are
equal in the population: µ1= µ2 =…= µG. The alternative hypothesis is that not all the means
in the population are equal.

When we reject the null hypothesis in a one-way ANOVA, we conclude that the group
means are not all the same in the population. But this can indicate different things. With
three groups, it can indicate that all three means are significantly different from each other.
Or it can indicate that one of the means is significantly different from the other two, but the
other two are not significantly different from each other. For this reason, statistically
significant one-way ANOVA results are typically followed up with a series
of post hoc comparisons of selected pairs of group means to determine which are different
from which others.

Key Reminders

• To compare more than two means, the most common null hypothesis test is the
analysis of variance (ANOVA). The one-way ANOVA is used for between-subjects
designs with one independent variable.

ANOVA - Score
Cases Sum of Squares df Mean Square F p VS-MPR* η²
Group 24.420 3.000 8.140 2.894 0.036 3.063 0.038
Residual 613.139 218.000 2.813
Note. Type III Sum of Squares

ANOVA Table from Response to Eye Color data

29
Reflect and Review 1 ANOVA: Eye Color
Response to Eye Color

Description: This data set, "Response to Eye Color", provides post-advertisement


attitudes towards a brand expressed by four different groups - each group saw the same
advertisement except for the aspect that was manipulated: the eye-color of the model.

Variables:
• Group - Experimental conditions (`Blue' = Model with blue eyes, `Brown' =
Model with brown eyes, `Green'= Model with green eyes, `Down' = Model's eye
color cannot be seen).
• Subj - Participant number.
• Score - An average of 10 survey questions about attitudes towards the brand (7-
point Likert scale). Higher averages correspond to more positive attitudes.

This example JASP file demonstrates the use of one-way ANOVA. Specifically, we assess
the adequacy of the null hypothesis that the attitudes are the same regardless of the eye-
color of the model

References:
Moore, D. S., McCabe, G. P., and Craig, B. A. (2012). Introduction to the Practice of Statistics
(7th ed.). New York: Freeman.

Simpson, P. M., Sturges, D. L., and Tanguma, J. (2008). The eyes have it, or do they? The
effects of model eye color and eye gaze on consumer as response. The Journal of Applied
Business and Economics, 8: 60-72.

Here is an overview for this task;


• Open the data file from the Data Library.
• Review the description about the data.
• We will be using the Descriptives and ANOVA Results that have already been
created.
• There will be some changes to the Descriptives Settings.
• There will be some changes to the ANOVA Settings.
• Answer the questions below.

30
Open the Response to Eye Color dataset from the JASP data Library
Data Library > Categories > ANOVA > Response to Eye Color

1. Review the Descriptive statistics for the Response to Eye Color data.

a. What do you notice about the measures of central tendency and standard
deviations in this data?

b. In the Plots settings, uncheck the Violin Element for Boxplots. In the Basic Plots
setting Check the Distribution Plot with Display Density. What do the Boxplots and
the Distribution Plots tell us about the data and the responses to each eye color used
in the study?

c. What hypothesis do you have about a person’s response to the advertisement


based on the model’s eye color?

31
2. Review the ANOVA Output. In the Post Hoc setting, move the Group variable from the
left window into the right window to create the Post Hoc table.

a. Review the Assumption Checks results. Should the ANOVA table or the Kruskal-
Wallis table (if using Kruskal-Wallis, check Dunn in the Type setting of the Post
Hoc) be used to determine statistical significance? Explain.

b. Is the difference in response to eye color statistically significant? How do we


know? What does the effect size tell us about these findings?

• H0: There is not a relationship between responses and on eye color.


• H1: There is a relationship between responses and on eye color.

c. In the Post Hoc tab, what conclusions can we make about the differences
response to eye color?

3. What conclusion should we make about the statistical significance of responses to the
model’s eye color?

Reflect and Review 2 ANOVA: Pain


Pain Thresholds

Description: This data set, "Pain thresholds", provides pain threshold for people with
different hair color.

Variables:
• V1 - Participant number.
• Hair Color - Hair color of the participant (`Light Blond' = light blond, `Dark
Blond' = dark blond, `Light Brunette' = light brunette, `Dark Brunette' = dark
brunette).

32
• Pain Tolerance - Performance on pain sensitivity test (the higher the score, the
better the pain tolerance).

This example JASP file demonstrates the use of one-way ANOVA.

Reference:
McClave, J. T. and Dietrich, F. H. (1991). Statistics. San Francisco: Dellen publishing.

Here is an overview of this task;


• Open the data from the Data Library.
• Review the text description of the data.
• We will IGNORE the Bayesian ANOVA Results.
• We will be reviewing the ANOVA Results with some additions to the settings.
• A Descriptives Results will be created.
• Answer the questions below.

Open the Pain Thresholds dataset from the JASP data Library
Data Library > Categories > ANOVA > Pain Thresholds

1. Use the Descriptive tab to create Descriptive statistics for the Pain Thresholds data. Move
Pain Threshold into the Variables window and Hair Color into the Split window. In the
Statistics Settings check Mean, Median, Standard Deviation, Maximum, and Minimum.

a. What do you notice about the measures of central tendency and standard
deviations in this data?

33
b. In the Plots Settings, check Boxplots with the Boxplot Element and Distribution
Plot with Display Density. What do the plots tell us about the data and the pain
threshold to each hair color used in the study?

c. What hypothesis do you have about a person’s pain threshold based on the
participant’s hair color?

2. Review the ANOVA Output. Let’s add some settings to the analysis. Use these settings;
Assumptions Check: Select Homogeneity tests and Q-Q plot of residuals
Post Hoc tests: Move Hair Color variable into the Post Hoc window on right
side.
ANOVA Settings: Select Estimates of Effect size and eta squared (n2)

a. Review the Assumptions check. Is it appropriate to use the ANOVA or the


Kruskal-Wallis test? Explain.

b. Is the difference in pain thresholds based on hair color statistically significant?


How do we know? What does the effect size tell us about these findings?

• H0: There is not a relationship between pain threshold and hair color.
• H1: There is a relationship between pain threshold and hair color.

c. What do the Post Hoc results tell us about these differences?

34
d. What conclusions can we make about the differences in this data?

Exploration 1 ANOVA: Singers


Singers

Description: This data set, "Singers", provided "Heights in inches of the singers in the
New York Choral Society in 1979. The data are grouped according to voice part. The
vocal range for each voice part increases in pitch according to the following order: Bass 2,
Bass 1, Tenor 2, Tenor 1, Alto 2, Alto 1, Soprano 2, Soprano 1". Data set included in R

Variables:
• Height - Height (in inches) of the singers.
• Gender - Gender of the singers (female, male).
• Pitch - Voice pitch of the singers (very low, low, high, very high)

This example JASP file demonstrates the use of Bayesian between subjects ANOVA.
Specifically, we will test whether female singers have different height than males and
whether the pitch relates to height.

Reference
Chambers, J. M., Cleveland, W. S., Kleiner, B., & Tukey, P. A. (1983). Graphical Methods for
Data Analysis. New York: Chapman & Hall.

R documentation by Kevin Wright at:


https://stat.ethz.ch/R-manual/R-devel/library/lattice/html/singer.html

Here is an overview of this task;


• Open the data from the Data Library.
• Review the text description of the data.

35
• We will IGNORE the Bayesian ANOVA Results.
• Classic ANOVA Results will be created.
• Descriptives Results will be created.
• Answer the questions below.

Open the Singers dataset from the JASP data Library


Data Library > Categories > ANOVA > Singers

1. Create the Descriptive statistics using the Descriptives tab. Move the Height data into the
Variables window and the Pitch data into the Split window. In the Statistics Setting, check
Mean Median, Standard Deviation, Maximum, and Minimum. Review frequencies, measure
of central tendency, standard deviation etc. for the height and pitch of the singers.

a. What do you notice about the measures of central tendency and the standard
deviation in this data?

b. In the Plots Settings, check Boxplots with the Boxplot Element and Distribution
Plot with Display Density. What do the plots tell us about the pitch and signer height
used in the study?

c. What hypothesis do you have about this data?

36
2. Create the Classic ANOVA Results. Use the following settings in the analysis.
Move Height into the Dependent Variable window and Pitch into the Fixed
Factor window.
Assumptions Check: Select Homogeneity tests and Q-Q plot of residuals
Post Hoc tests: Move Pitch variable into the Post Hoc window on right side and
for Type select both Standard and Dunn (for Kruskal-Wallis test)
ANOVA Settings: Select Estimates of Effect size and eta squared (n2)
Nonparametric: Move Pitch into right window for Kruskal-Wallis test (just in
case)

a. Review the Assumptions check. Is it appropriate to use the ANOVA or the


Kruskal-Wallis test? Explain.

b. Is the difference in pitch based the signer’s height statistically significant? How do
we know? What does the effect size tell us about these findings?

• H0: There is not a relationship between a signer’s pitch and their height.
• H1: There is a relationship between a signer’s pitch and their height

c. What do the Post Hoc results tell us about these differences?

d. What conclusions can we make about the differences in this data?

37
Exploration 2 ANOVA: Titanic
Titanic

Description: This data set, "Titanic", provides age, cabin class, and survival status of 1313
passengers on the Titanic.

Variables:
• Name - Name of the passenger.
• PClass - Cabin class of the passenger (1st, 2nd, or 3rd).
• Age - Age of the passenger.
• Sex - Sex of the passenger (female, male).
• Survived - Indicator variable for whether or not the passenger survived (0 = died,
1 = survived).

A video by Alexander Etz that explains the output of the procedure is available at
https://www.youtube.com/watch?v=bUgpJeeReBY.

Reference:
British Board of Trade (1990). Report on the Loss of the ‘Titanic’ (S.S.). British Board of Trade
Inquiry Report (reprint). Gloucester, UK: Allan Sutton Publishing.

This data set is available in R (https://stat.ethz.ch/R-manual/R-


devel/library/datasets/html/Titanic.html).

Here is an overview of this task;


• Open the data from the Data Library.
• Review the text description of the data.
• We will IGNORE the Logistic Regression Results.
• Classic ANOVA Results will be created.
• Descriptives Results will be created.
• Answer the questions below.

38
Open the Titanic dataset from the JASP data Library
Data Library > Categories > Regression > Titanic

1. Create the Descriptive statistics using the Descriptives tab. Move the Age data into the
Variables window and the Cabin Class (PClass) data into the Split window. In the Statistics
Setting, check Mean Median, Standard Deviation, Maximum, and Minimum. Review
frequencies, measure of central tendency, standard deviation etc. for the age of each
passenger and the cabin class they booked for the trip.

a. What do you notice about the measures of central tendency and the standard
deviation in this data?

b. In the Plots Settings, check Boxplots with the Boxplot Element and Distribution
Plot with Display Density. What do the plots tell us about the age and cabin class
used in the study?

c. What hypothesis do you have about this data?

39
2. Create the Classic ANOVA Results. Use the following settings in the analysis.
Move Age into the Dependent Variable window and PClass into the Fixed
Factor window.
Assumptions Check: Select Homogeneity tests and Q-Q plot of residuals
Post Hoc tests: Move Survived variable into the Post Hoc window on right side
and for Type select both Standard and Dunn (for Kruskal-Wallis test)
ANOVA Settings: Select Estimates of Effect size and eta squared (n2)
Nonparametric: Move Pitch into right window for Kruskal-Wallis test (just in
case)

a. Review the Assumptions check. Is it appropriate to use the ANOVA or the


Kruskal-Wallis test? Explain.

b. Is there a relationship between a passenger’s age and survivorship of the sinking?


How do we know? What does the effect size tell us about these findings?

• H0: There is not a relationship between a passenger’s age and cabin class they
booked for the trip.
• H1: There is a relationship between a passenger’s age and cabin class they
booked for the trip.

c. What do the Post Hoc results tell us about these differences?

d. What conclusions can we make about the differences in this data?

40
Correlation
Overview of Correlation Analysis
For relationships between quantitative variables, where Pearson’s r is used to describe the
strength of those relationships, the appropriate null hypothesis test is a Correlation test using
Pearson’s r. The basic logic is exactly the same as for other null hypothesis tests. In this case,
the null hypothesis is that there is no relationship in the population. The alternative
hypothesis is that there is a relationship in the population.

JASP can compute Pearson’s r and provide the p-value associated with that value of
Pearson’s r. As always, if the p-value is less than .05, we reject the null hypothesis and
conclude that there is a relationship between the variables in the population. If the p-value is
greater than .05, we retain the null hypothesis and conclude that there is not enough
evidence to say there is a relationship in the population.
The r-value in the correlation table can indicate the strength of the association between the
variables. The closer the r-value is to 1 or -1 the stronger the association. The table below
provides a general rule of thumb for judging the strength of the association.

r-value Strength of Relationship


-1.0 to -0.8 or 0.8 to 1.0 Very Strong
-0.79 to -0.6 or 0.6 to 0.870 Strong
-0.59 to -0.4 or 0.4 to 0.59 Moderate
-0.39 to -0.2 or 0.2 to 0.39 Weak
-0.19 to 0.19 None or very weak

Key reminders
• A null hypothesis test of Pearson’s r is used to compare a sample value of
Pearson’s r with a hypothetical population value of 0.
• The value of Pearson’s r can be used to determine the strength of these relationships.

Pearson Correlations
Revise Exam Anxiety
Pearson's r —
Revise
p-value —
Pearson's r 0.397 —
Exam
p-value < .001 —
Pearson's r -0.709 -0.441 —
Anxiety
p-value < .001 < .001 —

41
Reflect and Review Correlation: Exam Anxiety
Exam Anxiety

Description: This fictional data set, "Exam Anxiety", provides questionnaire scores by
students prior to an exam (the variables are anxiety, preparedness, and grade).

Variables:
• Code - Participant's identification number.
• Revise - Time spent studying for the exam (in hours).
• Exam - Performance in the exam (percentages).
• Anxiety - Anxiety prior to the exam as measured by the Exam Anxiety
Questionnaire.
• Gender - Participant's gender (Male, Female).

This example JASP file demonstrates the use of the Pearson correlation coefficient.
Specifically, we will investigate how the three measured variables correlate with each other.

Reference:
Field, A. P. (2017). Discovering Statistics Using IBM SPSS Statistics (5th ed.). London: Sage.
[Fictional data set]

The data set was constructed by Andy Field who therefore owns the copyright. Andy
Field generously agreed that we can include the data set in the JASP data library. This data
set is also publicly available on the website that accompanies Andy Field`s book,
https://edge.sagepub.com/field5e.

Without Andy Field`s explicit consent, this data set may not be distributed for commercial
purposes, this data set may not be edited, and this data set may not be presented without
acknowledging its source (i.e., the terms of a CC BY-NC-ND license).

Here is an overview of the task;


• Open the data in the Data Library
• We will be using the existing Results.
• Answer the questions below.

42
Open the Exam Anxiety dataset from the JASP data Library
Data Library > Categories > Regression > Exam Anxiety

1. Review the Pearson’s r Correlation table. What can you state about the relationship
(correlation) between these variables? How would you describe the strength of these
correlations?

2. Review the Scatterplots in the Correlation plot section (uncheck “Densities for variables”
in the Plots setting). How do the scatterplots relate to the strength of these correlations?

43
Exploration 1 Correlation: Album Sales
Album Sales

Description: This fictional data set, "Album Sales", provides factors that may influence
album sales.

Variables:
• adverts - Amount (in thousands of pounds) spent promoting the album before
release.
• sales - Sales (in thousands of copies) of each album in the week after release.
• airplay - How many times songs from the album were played on a prominent
national radio station in the week before release.
• attract - How attractive people found the band's image (1 to 10).

Reference:
Field, A. P. (2017). Discovering Statistics Using IBM SPSS Statistics (5th ed.). London: Sage.
[Fictional data set]

The data set was constructed by Andy Field who therefore owns the copyright. Andy
Field generously agreed that we can include the data set in the JASP data library. This data
set is also publicly available on the website that accompanies Andy Field`s book,
https://edge.sagepub.com/field5e.

Without Andy Field`s explicit consent, this data set may not be distributed for commercial
purposes, this data set may not be edited, and this data set may not be presented without
acknowledging its source (i.e., the terms of a CC BY-NC-ND license).

Here is an overview for the task;


• Open data from the Data Library.
• We will be IGNORING the Descriptives and two Linear Regression Results (for
now).
• We will be reviewing the Correlation Results that have already been completed.
• Answer the questions below.

44
Open the Album Sales dataset from the JASP data Library
Data Library > Categories > Regression > Album Sales

1. Review the Pearson’s r Correlation tables in the Correlation Matrix tab. What can you
state about the relationship (correlation) between these variables? How would you describe
the strength of these correlations?

2. Review the Scatterplots in the Correlation plot section (uncheck “Densities for variables”
in the Plots setting). How do the scatterplots relate to the strength of these correlations?

45
Exploration 2 Correlation: College Success
College Success

Description: This data set, "College Success", provides high school grades, SAT scores,
and Grade Point Average of 224 university students.

Variables:
• id - Participant ID.
• gpa - Grade Point Average (GPA) after three semesters in college.
• hsm - Average high-school grade in mathematics.
• hss - Average high-school grade in science.
• hse - Average high-school grade in English.
• satm - SAT score for mathematics.
• satv - SAT score for verbal knowledge.
• sex - Gender (labels not available)

Reference:
Moore, D. S., McCabe, G. P., and Craig, B. A. (2012). Introduction to the Practice of
Statistics (7th ed.). New York: Freeman.

Campbell, P. F. and McCabe, G. P. (1984). Predicting the success of freshmen in a


computer science major. Communications of the ACM, 27: 1108–1113.

Here is an overview for the task;


• Open data from the Data Library.
• We will be IGNORING the Descriptives and two Linear Regression Results (for
now).
• We will be reviewing the Correlation Results that have already been completed.
• Answer the questions below.

Open the College Success dataset from the JASP data Library
Data Library > Categories > Regression > College Success

46
1. Review the Pearson’s r Correlation tables in the Correlation Matrix tab. What can you
state about the relationship (correlation) between these variables? How would you describe
the strength of these correlations?

2. Review the Scatterplots in the Correlation plot section (uncheck “Densities for variables”
in the Plots setting). How do the scatterplots relate to the strength of these correlations?

47
Regression
Overview of Regression Analysis
Regression Analysis, typically Linear regression, is an approach for modeling the linear
relationship between two variables. Linear regression is a basic and commonly used type of
predictive analysis. The overall idea of regression is to examine two things: (1) does a set of
predictor variables do a good job in predicting or modeling an outcome (dependent)
variable? (2) Which variables in particular are significant predictors of the outcome variable,
and in what way do they impact the outcome variable? These regression estimates are used
to explain the relationship between one dependent variable and one or more independent
variables. The simplest form of the regression equation contains one dependent and one
independent variable.

Regression analysis is a reliable method of identifying which variables have impact on a topic
of interest. The process of performing a regression allows you to confidently determine
which factors matter most, which factors can be ignored, and how these factors influence
each other.

Regression lines always consider an error term because in reality, independent variables are
never precisely perfect predictors of dependent variables. This makes sense while looking at
the impact of real-life variables since there are clearly other variables that are contributing to
the effect being modeled. Your regression line is simply an estimate based on the data
available. So, the larger your error term, the less certain you can be about the regression line
model or predictor.

Simple linear regression is a statistical method that allows us to summarize and study
relationships between two continuous variables; one being thought of as the dependent
variable and the other acting as the independent variable.

Multiple regression is an extension of simple linear regression. It is used when we want to


predict the value of a dependent variable based on the value of two or more other
independent variables.

Coefficients
Model Unstandardized Standard Error Standardized t p
1 (Intercept) 106.071 10.285 10.313 < .001
Anxiety -0.666 0.135 -0.441 -4.938 < .001

48
Reflect and Review Simple Linear Regression: Album Sales
Album Sales

Description: This fictional data set, "Album Sales", provides factors that may influence
album sales.

Variables:
• adverts - Amount (in thousands of pounds) spent promoting the album before
release.
• sales - Sales (in thousands of copies) of each album in the week after release.
• airplay - How many times songs from the album were played on a prominent
national radio station in the week before release.
• attract - How attractive people found the band's image (1 to 10).

This example JASP file demonstrates the use of linear regression. First, we will fit a simple
model to see whether the adverts predict album sales. Then, we will test whether adding
airplay and attractiveness improves the predictions of the model.

Reference:
Field, A. P. (2017). Discovering Statistics Using IBM SPSS Statistics (5th ed.). London: Sage.
[Fictional data set]

The data set was constructed by Andy Field who therefore owns the copyright. Andy
Field generously agreed that we can include the data set in the JASP data library. This data
set is also publicly available on the website that accompanies Andy Field`s book,
https://edge.sagepub.com/field5e. Without Andy Field`s explicit consent, this data set
may not be distributed for commercial purposes, this data set may not be edited, and this
data set may not be presented without acknowledging its source (i.e., the terms of a CC
BY-NC-ND license).

Here is an overview for the task;


• Open data from the Data Library.
• We will be IGNORING the Descriptives, Correlation, and the second Linear
Regression Results (for now).
• We will be reviewing the first Linear Regression Results that have already been
completed.
• Answer the questions below.

49
Open the Album Sales dataset from the JASP data Library
Data Library > Categories > Regression > Album Sales

1. Review the first Linear Regression tab with sales as the dependent variable and adverts as
the covariate.

a. Review the Model Summary Results table. How much of the variation in album
sales can be “mathematically” attributed to the advertisements budget? Explain what
this means to us if we had to make decisions about the advertisement budget.

b. Review the ANOVA Results table. Are advertisements a significant predictor of


album sales? How do we know? Explain.

• H0: There is not an association between album sales and advertising budgets.
• H1: There is an association between album sales and advertising budgets

c. Describe the change in album sales (sales) in relation to the change in the amount
spent on advertising (adverts) that is modeled in our Coefficients Table.

50
Reflect and Review Multiple Linear Regression: Album Sales
Album Sales

Description: This fictional data set, "Album Sales", provides factors that may influence
album sales.

Variables:
• adverts - Amount (in thousands of pounds) spent promoting the album before
release.
• sales - Sales (in thousands of copies) of each album in the week after release.
• airplay - How many times songs from the album were played on a prominent
national radio station in the week before release.
• attract - How attractive people found the band's image (1 to 10).

This example JASP file demonstrates the use of linear regression. First, we will fit a simple
model to see whether the adverts predict album sales. Then, we will test whether adding
airplay and attractiveness improves the predictions of the model.

Reference:
Field, A. P. (2017). Discovering Statistics Using IBM SPSS Statistics (5th ed.). London: Sage.
[Fictional data set]

The data set was constructed by Andy Field who therefore owns the copyright. Andy
Field generously agreed that we can include the data set in the JASP data library. This data
set is also publicly available on the website that accompanies Andy Field`s book,
https://edge.sagepub.com/field5e. Without Andy Field`s explicit consent, this data set
may not be distributed for commercial purposes, this data set may not be edited, and this
data set may not be presented without acknowledging its source (i.e., the terms of a CC
BY-NC-ND license).

Here is an overview for the task;


• Open data from the Data Library.
• We will be IGNORING the Descriptives, Correlation, and the first Linear
Regression Results (for now).
• We will be reviewing the second Linear Regression Results that have already been
completed.
• Answer the questions below.

51
Open the Album Sales dataset from the JASP data Library
Data Library > Categories > Regression > Album Sales

1. Review the second Linear Regression tab with sales as the dependent variable and adverts,
airplay, and attract as the covariates.

a. Review the Model Summary Results table. How much did the model improve
from the Simple Regression (H0) with only advertising budget (adverts) to Multiple
regression (H1) with the addition of airplay time (airplay) and perception of the
band’s attractiveness (attract)? Explain what this means to us if we had to make
decisions about the advertisement budget.

b. Review the ANOVA Results table. Are variables a significant predictor of album
sales? How do we know? Explain.

• H0: There is not an association between album sales and advertising budgets,
album airplay, and perceived attractiveness of the band.
• H1: There is an association between album sales and advertising budgets,
album airplay, and perceived attractiveness of the band.

52
c. Describe the change in album sales (sales) in relation to the change in the amount
spent on advertising (adverts), album airplay time (airplay), and perceived
attractiveness of the band (attract) that is modeled in our Coefficients Table.

Exploration 1 Simple and Multiple Regression: Auction


Auction

Description: This data set, "Auction", provides the selling price and age of antique clocks,
and the number of bidders in the auction.

Variables:
• Age - Age of the antique clock.
• Bidders - The number of bidders in the auction.
• Price - The final selling price of the clock.

This example JASP file demonstrates the use of Bayesian linear regression. Specifically, we
are interested whether and to what extent the age of the clocks and the number of bidders
in the auction predict the final selling price.

Reference:
Mendenhall, W, and Sincich, TL (1993). A Second Course in Statistics: Regression Analysis (6th
ed.), New Jersey: Prentice-Hall.

Here is an overview for the task;


• Open data from the Data Library.
• We will be IGNORING the Descriptives and Bayesian Linear Regression Results
• Create a Correlation matrix.
• Create a Simple and Multiple Linear Regression model.
• Answer the questions below.

53
Open the Auction dataset from the JASP data Library
Data Library > Categories > Regression > Auction

Correlation
1. Create the Correlation Matrix for this data. Move Price, Age, and Bidders into the
Variables window. Describe the strength of the correlation between these variables. Would
this correlation suggest creating a regression model?

Simple Linear Regression


2. Create and review a Simple Linear Regression model with Price in the Dependent Variable
window and Age in the Covariate window.

a. Reviewing the Model Summary Table, how much of the variation in the clock’s
price is explained by the clock’s age in simple regression model, as represented by H1
in the table? Explain what this means?

b. Reviewing the ANOVA table, is the simple regression model with age of clock
statistically significant in predicting clock selling price? Explain.

c. Describe the change in the clock’s selling price (Price) in relation to the change in
the clock’s age (Age) that is modeled in the Coefficients Table.

54
Multiple Linear Regression
3. Create and review a Multiple Linear Regression model with Price in the Dependent
Variable window and both Age & Bidders as the Covariates window.

a. In the Model settings, check the box next to Age in the Model Terms to “add to
the null model”. Reviewing the Model Summary Table, how much of the variation in
the clock’s price is explained by the clock’s age and the number of bidders in the
multiple regression model, as represented by H1 in the table? Explain what this
means?

b. Reviewing the ANOVA table, is the multiple regression model with age of clock
and the number of bidders statistically significant in predicting clock selling price?
Explain.

c. Describe the change in the clock’s selling price (Price) in relation to the changes in
the clock’s age (Age) and the number of bidders (Bidders) that is modeled in the
Coefficients Table.

d. Is the Multiple Regression model a better predictor of the clock’s selling price
compared to the Simple Regression? In the Model Summary Table, compare the
Simple regression with Age (H0) with the Multiple Regression model of Age and
Bidders (H1). Explain why.

55
Exploration 2 Simple and Multiple Regression: Exam Anxiety
Exam Anxiety

Description: This fictional data set, "Exam Anxiety", provides questionnaire scores by
students prior to an exam (the variables are anxiety, preparedness, and grade).

Variables:
• Code - Participant's identification number.
• Revise - Time spent studying for the exam (in hours).
• Exam - Performance in the exam (percentages).
• Anxiety - Anxiety prior to the exam as measured by the Exam Anxiety
Questionnaire.
• Gender - Participant's gender (Male, Female).

This example JASP file demonstrates the use of the Pearson correlation coefficient.
Specifically, we will investigate how the three measured variables correlate with each other.

Reference:
Field, A. P. (2017). Discovering Statistics Using IBM SPSS Statistics (5th ed.). London: Sage.
[Fictional data set]

The data set was constructed by Andy Field who therefore owns the copyright. Andy
Field generously agreed that we can include the data set in the JASP data library. This data
set is also publicly available on the website that accompanies Andy Field`s book,
https://edge.sagepub.com/field5e. Without Andy Field`s explicit consent, this data set
may not be distributed for commercial purposes, this data set may not be edited, and this
data set may not be presented without acknowledging its source (i.e., the terms of a CC
BY-NC-ND license).

Here is an overview for the task;


• Open data from the Data Library.
• Use the existing Correlation matrix.
• Create a Simple and Multiple Linear Regression model.
• Answer the questions below.

Open the Exam Anxiety dataset from the JASP data Library
Data Library > Categories > Regression > Exam Anxiety

56
Simple Linear Regression
1. Create and review a Simple Linear Regression model with Exam in the Dependent
Variable window and Revise in the Covariate window.

a. Reviewing the Model Summary Table, how much of the variation in the exam
grade (Exam) is explained by time spent studying (Revise) in the simple regression
model, as represented by H1 in the table? Explain what this means?

b. Reviewing the ANOVA table, is the simple regression model with the time
studying (Revise) statistically significant in predicting the exam grade? Explain.

c. Describe the change in the exam grade (Exam) in relation to the change in the
time spent studying (Revise) that is modeled in the Coefficients Table.

57
Multiple Linear Regression
2 Create and review a Multiple Linear Regression model with Exam in the Dependent
Variable window and both Revise & Anxiety as the Covariates window.

a. In the Model settings, check the box next to Revise in the Model Terms to “add to
the null model”. Reviewing the Model Summary Table, how much of the variation in
the exam grade (Exam) is explained by the multiple regression model, as represented
by H1 in the table? Explain what this means?

b. Reviewing the ANOVA table, is the multiple regression model with time spent
studying (Revise) and student math anxiety (Anxiety) statistically significant in
predicting exam grade (Exam)? Explain.

c. Describe the change in the exam grade (Exam) in relation to the changes in the
time studying (Revise) and student math anxiety (Anxiety) that is modeled in the
Coefficients Table.

d. Is the Multiple Regression model a better predictor of the exam grade compared
to the Simple Regression? In the Model Summary Table, compare the Simple
regression with Age (H0) with the Multiple Regression model of Revise and Anxiety
(H1). Explain why.

58
Correlation & Regression Decision Making
Exam Anxiety

Description: This fictional data set, "Exam Anxiety", provides questionnaire scores by
students prior to an exam (the variables are anxiety, preparedness, and grade).

Variables:
• Code - Participant's identification number.
• Revise - Time spent studying for the exam (in hours).
• Exam - Performance in the exam (percentages).
• Anxiety - Anxiety prior to the exam as measured by the Exam Anxiety
Questionnaire.
• Gender - Participant's gender (Male, Female).

This example JASP file demonstrates the use of the Pearson correlation coefficient.
Specifically, we will investigate how the three measured variables correlate with each other.

Reference:
Field, A. P. (2017). Discovering Statistics Using IBM SPSS Statistics (5th ed.). London: Sage.
[Fictional data set]

The data set was constructed by Andy Field who therefore owns the copyright. Andy
Field generously agreed that we can include the data set in the JASP data library. This data
set is also publicly available on the website that accompanies Andy Field`s book,
https://edge.sagepub.com/field5e. Without Andy Field`s explicit consent, this data set
may not be distributed for commercial purposes, this data set may not be edited, and this
data set may not be presented without acknowledging its source (i.e., the terms of a CC
BY-NC-ND license).

Here is an overview for the task;


• Open data from the Data Library.
• Use the existing Correlation matrix.
• Create a new Simple Regression model.
• Answer the questions below.

59
Open the Exam Anxiety dataset from the JASP data Library
Data Library > Categories > Regression > Exam Anxiety

Correlation
1. Review the Correlation Matrix. Thinking back to the previous exercise, explain why we
should decide to explore a Simple Linear Regression model for Anxiety-Revise. Explain why
we might choose NOT to perform a Regression model for either Exam-Anxiety or Exam-
Revise.

Simple Linear Regression


2. Create and review a Simple Linear Regression model with Anxiety in the Dependent
Variable window and Revise in the Covariate window.

a. Reviewing the Model Summary Table, how much of the variation in the exam
grade (Anxiety) is explained by time spent studying (Revise) in the simple regression
model, as represented by H1 in the table? Explain what this means?

b. Reviewing the ANOVA table, is the simple regression model with the time
studying (Revise) statistically significant in predicting the Test Anxiety? Explain.

c. Describe the change in test anxiety (Anxiety) in relation to the change in the time
spent studying (Revise) that is modeled in the Coefficients Table.

60
Chi Square Test of Independence
Overview of Chi Square Analysis
The Chi-Square test of independence is used to determine if there is a significant relationship
between two nominal (categorical) variables. The frequency of each category for one
nominal variable is compared across the categories of the second nominal variable. The data
can be displayed in a contingency table where each row represents a category for one
variable and each column represents a category for the other variable. For example, say a
researcher wants to examine the relationship between bias (correct or incorrect question)
and identity (racial and gender), as shown in the JASP Data Library MOOC Bias data. The
chi-square test of independence can be used to examine this relationship. The null
hypothesis for this test is that there is no relationship between bias and question. The
alternative hypothesis is that there is a relationship between bias and question (e.g. that
MOOC lecturers are biased towards certain student identities).

Contingency Tables
Answer
Group Yes No Total
Count 9.000 115.000 124.000
BF
% within row 7.258 % 92.742 % 100.000 %
Count 8.000 116.000 124.000
BM
% within row 6.452 % 93.548 % 100.000 %
Count 11.000 113.000 124.000
CF
% within row 8.871 % 91.129 % 100.000 %
Count 7.000 117.000 124.000
CM
% within row 5.645 % 94.355 % 100.000 %
Count 8.000 116.000 124.000
IF
% within row 6.452 % 93.548 % 100.000 %
Count 4.000 120.000 124.000
IM
% within row 3.226 % 96.774 % 100.000 %
Count 7.000 117.000 124.000
WF
% within row 5.645 % 94.355 % 100.000 %
Count 15.000 109.000 124.000
WM
% within row 12.097 % 87.903 % 100.000 %
Count 69.000 923.000 992.000
Total
% within row 6.956 % 93.044 % 100.000 %

61
Reflect and Review Chi Square Analysis: Dancing Cats & Dogs

Description:

This fictional data set, "Dancing Cats and Dogs", provides the number of cats and dogs
who learned to dance, trained by one of two types of conditioning.

Variables:
• Animal - Species of animal trained (Cat, Dog).
• Training - Type of conditioning (Food as reward, Affection as reward).
• Dance - Did the animal learn to dance? (Yes, No).

This example JASP file demonstrates the use of a log-linear analysis. We will examine
which type of training is better for cats and dogs using a log-linear analysis.

Reference:
Field, A. P. (2017). Discovering Statistics Using IBM SPSS Statistics (5th ed.). London: Sage.

1. Open the Dancing Cats dataset from the JASP data Library
• Data Library > Categories > Frequencies > Dancing Cats

2. Here is the overview of the task


• Review the description for this data
• Create two new Descriptives output tables for the data
• The Contingency Table analysis will already be done, so we will be reviewing this
output.
• Check the settings and the output table for the analysis
• Answer the questions below
• For this task, please IGNORE the Log-Linear Regression output tables.

Open the Dancing Cats dataset from the JASP data Library
Data Library > Categories > Frequencies > Dancing Cats

62
1. Create TWO Descriptives Results for this data.

Descriptives #1: Move "Dance" into the Variables window and "Animal" into
the Split window. Create a Frequency Table and Distribution plot.
Descriptives #2: Move "Dance" into the Variables window and "Training" into
the Split window. Create a Frequency Table and Distribution plot.

Describe the differences you notice in an animal learning to dance depending on the animal
type (Dog or Cat) and the Training method (food or affection).

2. Review the Chi Squared test output table. Which animal demonstrated statistically
significant differences in learning to dance based on the training? Explain how we arrive at
this conclusion based on the output tables.

Our hypothesis for this study is;

• H0: There is no relationship between an animal learning to dance and either the
animal type or the training method used.
• H1: There is a relationship between an animal learning to dance and either the animal
type or the training method used.

3. Review the Contingency Table results. Explain where in the counts & percentages that we
find the evidence to support the statistically significant results?

63
4. How would you summarize the results of this analysis?

Exploration Chi Square Analysis: Health Habits


Health Habits

Description: This data set, "Health Habits", provides physical activity and consumption
of fruits of 1184 students.
Variables:

• Physical Activity - Physical activity of the participant (Low, Moderate, Vigorous).


• Fruit Consumption - Participant's consumption of fruits (Low, Medium, High).

This example JASP file demonstrates the use of a Chi-squared test of independence.
Specifically, we assess the adequacy of the null hypothesis that physical activity and fruit
consumption are independent.

Reference:

Moore, D. S., McCabe, G. P., and Craig, B. A. (2012). Introduction to the Practice of
Statistics (7th ed.). New York: Freeman.
Seo, D.-C., Nehl, E., Agley, J., and Ma, S.-M. (2007). Relations between physical activity
and behavioral and perceptual correlates among midwestern college students. Journal of
American College Health, 56: 187-197.

1. Open the Health Habits dataset from the JASP data Library
• Data Library > Categories > Frequencies > Health Habits

2. Here is an overview of the task.


• The Contingency Table analysis will already be completed, however we will be
IGNORING this output table and creating our own.
• Review the blue text describing this data set.

64
• Create a new Descriptives Results Table with Physical Activity and Fruit
Consumption.
• Create a new Contingency Table following the settings described in the questions.
• Answer the questions below

Open the Health Habits dataset from the JASP data Library
Data Library > Categories > Frequencies > Health Habits

1. Use the Descriptive tab to move Fruit Consumption into the Variables window and
Physical Activity into the Split window. Create a Frequency Table and Distribution Plot for
this data. We will not use any of the Statistics settings. What do you notice about the data?
Be sure to use the values to support your explanation.

65
2. Create a new contingency table. I think of Contingency Tables as "the rows are impacting
the columns", or rows represent Independent Variables and columns represent Dependent
Variables.

Move Physical Activity into the row and Fruit Consumption into the column.
In the Statistics settings, check the Phi and Cramer's V for effect size.
In Cells settings, check Expected under Counts and Row under Percentages.

Is this relationship between Physical Activity and Fruit Consumption statistically significant?
What values indicate this conclusion?

• H0: There is no relationship between Physical Activity and Fruit Consumption.


• H1: There is a relationship between Physical Activity and Fruit Consumption.

3. Review the Contingency Table results. Explain where in the counts & percentages that we
find the evidence to support the statistically significant results?

4. How would you summarize the findings of this analysis?

66
Binomial test
Overview of Binomial Test
The binomial test is used when a study has two possible outcomes (i.e.
success/failure) and you have an idea about what the probability of success is among the
larger population. A binomial test is run to see if observed test results differ from what was
expected.

A binomial test uses sample data to determine if the population proportion of one level in a
binary (or dichotomous) variable equals a specific claimed value that is generally known. For
example, a binomial test could be run to see if the proportion of students at a specific school
with blue eyes is equal to 0.17 (17%), which is expected based on a genetic model for eye
color among humans.

The test calculates the probability of getting from a specific sample size, n, the number of the
desired outcome, in this case, the number of blue-eyed students, as extreme or more extreme
than what was observed if the true proportion actually equaled the claim (0.17).

Binomial Test
95% CI for Proportion
Variable Level Counts Total Proportion p Lower Upper
Product Theirs 7 20 0.350 0.263 0.154 0.592
Yours 13 20 0.650 0.263 0.408 0.846
Note. Proportions tested against value: 0.5.

67
Reflect and Review Binomial Test: Sun Block
Sun Block Lotions

Description: This fictional data set, "Sun Block Lotions", provides responses of 20
participants to the question: "Which of these two sun block lotions is better?"

Variable:
• Product - responses of the participants (Yours = your product is better, Theirs =
other product is better).

This example JASP file demonstrates the use of binomial test. We will test whether our
sun block lotion is as effective as that of a different company (i.e., we will test the null
hypothesis that the binomial rate parameter theta equals 0.5).

Reference:
Moore, D. S., McCabe, G. P., and Craig, B. A. (2012). Introduction to the Practice of
Statistics (7th ed.). New York: W. H. Freeman and Company.

This data set was constructed by Moore, D. S., McCabe, G. P., and Craig, B. A. (2012).
Introduction to the Practice of Statistics (7th ed.). New York: W. H. Freeman and
Company. The example was created by Moore, McCabe and Craig who therefore own the
copyright. Moore, McCabe and Craig generously agreed that we can include the data set in
the JASP data library. This data set is also publicly available on the website that
accompanies their book, \url{whfreeman.com/ips7e}. Without the authors' explicit
consent, this data set may not be distributed for commercial purposes, this data set may
not be edited, and this data set may not be presented without acknowledging its source
(i.e., the terms of a CC BY-NC-ND license).

Here is an overview of the task.


• The Binomial Test analysis will already be completed
• Review the text describing this data set.
• Answer the questions below

68
Open the Sun Block dataset from the JASP data Library
Data Library > Categories > Frequencies > Sun Block

1. Review the Binomial test settings. Why is the test value set at 0.5?

2. Review the Binomial test results table. Are the results of people selecting between two sun
block products statistically significant from the expected result?

• H0: There is not a difference in which sun block people chose beyond chance.
• H1: There is a difference in which sun block people chose beyond chance.

3. Review the Descriptive Plots for this data. How does the plot relate to the statistical
results? What do these graphs tell us about the data?

4. How can you summarize the results of this analysis?

69
Exploration Binomial Test: Dancing Cats and Dogs
Dancing Cats and Dogs

Description: This fictional data set, "Dancing Cats and Dogs", provides the number of
cats and dogs who learned to dance, trained by one of two types of conditioning.

Variables:
• Animal - Species of animal trained (Cat, Dog).
• Training - Type of conditioning (Food as reward, Affection as reward).
• Dance - Did the animal learn to dance? (Yes, No).

This example JASP file demonstrates the use of a log-linear analysis. We will examine
which type of training is better for cats and dogs using a log-linear analysis.

Reference:
Field, A. P. (2017). Discovering Statistics Using IBM SPSS Statistics (5th ed.). London: Sage.
The data set was constructed by Andy Field who therefore owns the copyright. Andy
Field generously agreed that we can include the data set in the JASP data library. This data
set is also publicly available on the website that accompanies Andy Field`s book,
https://edge.sagepub.com/field5e. Without Andy Field`s explicit consent, this data set
may not be distributed for commercial purposes, this data set may not be edited, and this
data set may not be presented without acknowledging its source (i.e., the terms of a CC
BY-NC-ND license).

Here is an overview of the task.


• In this task we will not be using the Descriptives, Log-Linear Regression, or the
Contingency Table results for this task.
• The Binomial Test analysis will be created.
• Review the text describing this data set.
• Answer the questions below.

70
Open the Dancing Cats and Dogs dataset from the JASP data Library
Data Library > Categories > Frequencies > Dancing Cats and Dogs

1. Use the Frequencies tab to create a Binomial Test. Explain why we might choose a test
value of 0.5 for this analysis?
Move Dance into the Variables window
Set the Test value to 0.5 and the Alt. Hypothesis to “≠ test Value”.
Check Descriptive Plots

2. Was the result of our dogs and cats dancing significantly different than the expected
value? What does this result mean?

3. Could we justify selecting a different test value? What would a test value of 0.33 mean in
this study?

4. Change the Test Value to 0.33 and review the Binomial Test Results. Was the result of our
dogs and cats dancing significantly different than the expected value? What does this result
mean?

71
Point Biserial Correlation
Overview of Point Biserial Correlation Analysis
The Point-Biserial Correlation Coefficient measures of the strength of association between a
continuous-level variable (ratio or interval data) and a binary variable. Binary variables are
variables of nominal scale with only two values. They are also called dichotomous variables.
Binary variables are commonly used to express the existence of a certain characteristic, such
as success or failure, or a group identification, such as male or female.

Like all Correlation Coefficients (e.g. Pearson’s r, Spearman’s rho), the Point-Biserial
Correlation Coefficient measures the strength of association of two variables in a single
measure ranging from -1 to +1, where -1 indicates a perfect negative association, +1
indicates a perfect positive association and 0 indicates no association at all. All correlation
coefficients are interdependency measures that do not express a causal relationship.

Mathematically, the Point-Biserial Correlation Coefficient is calculated just as the Pearson’s


Bivariate Correlation Coefficient would be calculated, wherein the dichotomous variable of
the two variables is either 0 or 1—which is why it is also called the binary variable. Since we
use the same mathematical concept, we do need to fulfill the same assumptions, which are
normal distribution of the continuous variable and homoscedasticity.

Pearson Correlations
Survived Age
Pearson's r —
Survived
p-value —
Pearson's r -0.061 —
Age
p-value 0.092 —

72
Exploration 1 Point Biserial Correlation: Invisibility Cloak
Invisibility Cloak

This data set, "Invisibility Cloak", provides the number of mischievous acts committed by
two groups of people, those with and those without and invisibility cloak.

Variables:
• Participant - Identification number of a participant.
• Cloak - Experimental group (0 = without a cloak of invisibility, 1 = with a cloak of
invisibility).
• Mischief - the number of mischievous acts committed by a participant.

Reference:
Field, A. P. (2017). Discovering Statistics Using IBM SPSS Statistics (5th ed.). London: Sage.
[Fictional data set]

The data set was constructed by Andy Field who therefore owns the copyright. Andy
Field generously agreed that we can include the data set in the JASP data library. This data
set is also publicly available on the website that accompanies Andy Field`s book,
https://edge.sagepub.com/field5e. Without Andy Field`s explicit consent, this data set
may not be distributed for commercial purposes, this data set may not be edited, and this
data set may not be presented without acknowledging its source (i.e., the terms of a CC
BY-NC-ND license).

Here is an overview for the task;


• Open the data from the data library.
• The completed Independent Samples t-Test will not be used in the task.
• Create a Point-Biserial Correlation.
• Answer the questions below.

73
Open the Invisibility Cloak dataset from the JASP data Library
Data Library > Categories > t-Test > Invisibility Cloak

1. Use the Regression tab to create a Correlation Matrix. Move the Mischief and Cloak
variables into the Variables window. Select the Pearson Correlation Coefficient.

a. Is there a statistically significant correlation between the amount of mischief


someone gets into and whether or not they had the invisibility cloak?

§ H0: There is not an association between mischief and having an invisibility


cloak.
§ H1: There is an association between mischief and having an invisibility cloak.

b. What can you state about the relationship (correlation) between these variables?
How would you describe the strength of these correlations?

74
Exploration 2 Point Biserial Correlation: Biggest Liar Contest
Description:

This fictional data set, "The Biggest Liar", provides participants' creativity test scores and
their rankings in a lying competition.

Variables:
• Creativity - The creativity test score.
• Position - The ranking achieved in the Biggest Liar contest.
• Novice - Is the person participating for the first time (1) or not (0)?

This example JASP file demonstrates the use of Spearman's and Kendall's correlation.
Specifically, we will assess the adequacy of the null hypothesis which posits that creativity
is uncorrelated to the rank in the lying contest.

Reference:
Field, A. P. (2017). Discovering Statistics Using IBM SPSS Statistics (5th ed.). London: Sage.
[Fictional data set]

Here is an overview for the task;


• Open the data from the data library.
• The completed Descriptives and Correlation Matrix will not be used in the task.
• Create a Point-Biserial Correlation.
• Answer the questions below.

Open the Invisibility Cloak dataset from the JASP data Library
Data Library > Categories > Regression > Biggest Liar

75
1. Use the Regression tab to create a Correlation Matrix. Move the Creativity and Novice
variables into the Variables window. Select the Pearson Correlation Coefficient.

a. Is there a statistically significant correlation between the creativity score received


on the and whether or not it was the contestants first time on the show?

§ H0: There is not an association between a person’s rating on creativity and


being a contestant on the show.
§ H1: There is an association between a person’s rating on creativity and being
a first-time contestant on the show.

b. What can you state about the relationship (correlation) between these variables?
How would you describe the strength of these correlations?

76
77
The above work is licensed under a Creative Commons Attribution-NonCommercial 2.5 License.
https://xkcd.com/1345/

78
The JASP Workbook Solutions

79
Reflect and Review Descriptives: Sleep (pg 10)
1a. The mean for Group 2 is higher than Group 1 by a little less than 1 hour of extra sleep.

1b. The Standard Deviation for Group 1 is about 1.7 hours of extra sleep while the Standard
Deviation for Group 2 a greater, about 2.3 hours of extra sleep. This shows that the
variation in Group 2 is greater than in Group 1.

2a. Group 2’s boxplot is higher than Group 1. The mean, maximum and minimum values
are greater in Group 2 than in Group 1. We can also observe in Group 1 that the middle
quartiles have less variation than the middle quartiles (the boxed areas of the plot) of Group
2. The first and fourth quartiles of Group 1 shows greater variation that the first and fourth
quartile of Group 2, the lines are closer together.

3. The descriptive data gives the appearance of increased sleep for Group 2 when compared
to Group 1.

Exploration 1 of Descriptives: Eye Movement (pg 11)


1a. The median and the mode are both at 11 recall words, while the mean is just around 13
recall words.

1b. With the standard deviation of 5, we know that around 66% of the participants could
recall between 8 to 18 words.

2a. The distribution plot has a fairly Normal curve shape with the largest number of recall
words between 11 to 15 words, and the graph goes down on both sides from there.

2b. There is no single answer here. The graph could suggest that we are going to use
parametric analysis tools with this data. We could also ask about the second highest range of
recall words seems to be between 5 and 10 which is below the mean.

3a. The Boxplot shows that the first and second quartile data is spread fairly wide. The third
quartile has the data points clustered around a small range of values for the number of recall
words.

3b. The data as a set does not have any outliers.

4a. In the two groups, the fixed eye gaze has a higher mean and median, although the mode
of 11 is the same in both groups.

80
4b. The fixed eye gaze group has a higher standard deviation of approximately 6, so about
66% of the participants could recall 9 to 21 words. The horizonal gaze group with a standard
deviation of about 4, 66% of the participants could recall 6 to 14 words.

5a. The fixed eye group has a much more even distribution of recalled words between 10 to
25. The horizontal group has most counts below the mean with fewer participants in the
higher values for recalled words.

5b. We could ask about the horizontal group have fewer participants able to recall a large
number of words. Also, the fixed group having so many recalled words higher than the
mean could be interesting.

6a. The boxplots show that the fixed group has a wider spread of the data. We find the
median of the fixed group higher than the horizontal group, but not by much.

6b. There is one outlier in the horizontal group that has a very high word recall cunt. This
could account for the means being much closer than the graphs suggest.

7. In general, the fixed eye group seems to be able to recall more words than the horizontal
eye group.

Exploration 2 of Descriptives: Titanic (pg 15)


1. In looking at the Titanic data, I began with the Survived factor. When we look at the
Survival data split by sex, 66% of the women passengers survived while 16% of the male
passengers survived. When we look at survival by Passenger Class, 59.9% of the First-Class
passengers survived, 42% of the Second-Class passengers survived, and only 19.4% of the
Third-Class passengers survived. We can also see that the total number of Third-Class
passengers was 711, more than the First- and Second-class passengers combined.

2. It seems that a person was more likely to survive the Titanic in First Class cabins than if
they were in 2nd or 3rd Class Cabins, even though the 3rd Class passengers outnumbered 1st
Class. And it was more likely that someone survived if they were a woman.

Reflect and Review Independent Samples t-Test: Directed Reading


Activities (pg 18)
1. The mean for the Control group was much lower than the Treatment group. The
difference was about 10 points. There is greater variation in the results for the Treatment

81
group, with a higher standard deviation and the Boxplot is more spread out and distributed
over the 4 quartiles. It seems that third graders who participated in the Directed Reading
activities scored better on the test.

2. It is appropriate to use the Student’s t-test since both assumptions checks are not
significant. Because these assumptions checks are not significant, we have not violated the
assumptions needed to perform the Student’s t-Test.

3. We reject the Null hypothesis. The differences between the Treatment and Control
groups are statistically significant, p = 0.014 in this study.

Independent Samples T-Test


Test Statistic df p VS-MPR* Mean Difference SE Difference Cohen's d
Student -2.26 42.0 0.014 6.052 -9.954 4.392 -0.684
Welch -2.31 37.8 0.013 6.443 -9.954 4.308 -0.691

Exploration 1 of Independent Samples t-Test: Sleep (pg 20)


1. The mean for Group 2 is higher than Group 1 by a little less than 1 hour of extra sleep.

The Standard Deviation for Group 1 is about 1.7 hours of extra sleep while the Standard
Deviation for Group 2 a greater, about 2.3 hours of extra sleep. This shows that the
variation in Group 2 is greater than in Group 1.

Group 2’s boxplot is higher than Group 1. The mean, maximum and minimum values are
greater in Group 2 than in Group 1. We can also observe in Group 1 that the middle
quartiles have less variation than the middle quartiles (the boxed areas of the plot) of Group
2. The first and fourth quartiles of Group 1 shows greater variation that the first and fourth
quartile of Group 2, the lines are closer together.

The descriptive data gives the appearance of increased sleep for Group 2 when compared to
Group 1. I would guess that the group 2 pill was more effective in given the participants
more sleep.

2. The Assumptions tests is NOT significant, so it is appropriate to use the Student’s t-test.

Test of Normality (Shapiro-Wilk)


W p
extra 1 0.926 0.408
2 0.919 0.351

82
Test of Normality (Shapiro-Wilk)
W p
Note. Significant results suggest a deviation from normality.

Test of Equality of Variances (Levene's)


F df p
extra 0.620 1 0.441

3. We reject the Null hypothesis. The differences between the two drugs is statistically
significant, p-value = 0.04, so group 2 has more sleep than group 1.

Independent Samples T-Test


t df p
extra -1.861 18 0.040
Note. For all tests, the alternative hypothesis specifies that group 1 is less than group 2
.
Note. Student's t-test.

4. The result is not statistically significant (p = 0.079). The change is because when we set
the alternative hypothesis to Group 1 < Group 2, this is a one-tailed test, so the left tail is
5% of the distribution. When we use Group 1 ≠ Group 2, this is a two-tailed test so each tail
(the left and right) is 2.5% of the distribution.

Independent Samples T-Test


t df p
extra -1.861 18 0.079
Note. Student's t-test.

Exploration 2 of Independent Samples t-Test: College Success (pg


22)
1. The means are very similar except for high school English (hse) and STA Math (satm).
For hse group 1 and group 2 had means of 7.7 and 8.7 respectively and satm means of 611.7
and 565 respectively.

2a. The Test of Normality does have significant differences and the Test of Equality of
Variances is not significant. We should use the Welch t-Test.

83
2b. We reject the Null hypothesis. There are statistically significant differences in two of the
variables; High School English (hse) and SAT Mathematics scores (satm).

Independent Samples T-Test


Test Statistic df p Cohen's d
gpa Student -0.715 222.000 0.476 -0.100
Welch -0.736 174.741 0.462 -0.101
hsm Student -1.076 222.000 0.283 -0.150
Welch -1.071 158.159 0.286 -0.150
hss Student -0.160 222.000 0.873 -0.022
Welch -0.159 157.751 0.874 -0.022
hse Student -4.931 222.000 < .001 -0.690
Welch -5.370 201.411 < .001 -0.718
satm Student 3.997 222.000 < .001 0.559
Welch 4.012 162.167 < .001 0.560
satv Student 0.940 222.000 0.348 0.131
Welch 0.955 167.920 0.341 0.132

3. Gender “2” has a higher high school English grade when compared to gender “1”.
Gender “1” has a higher SAT Mathematics score when compared to gender “2”.

Group Descriptives
Group N Mean SD SE
gpa 1 145 2.608 0.807 0.067
2 79 2.686 0.729 0.082
hsm 1 145 8.234 1.629 0.135
2 79 8.481 1.655 0.186
hss 1 145 8.076 1.692 0.140
2 79 8.114 1.725 0.194
hse 1 145 7.745 1.562 0.130
2 79 8.734 1.163 0.131
satm 1 145 611.772 84.021 6.978

84
Group Descriptives
Group N Mean SD SE
2 79 565.025 82.929 9.330
satv 1 145 508.841 94.348 7.835
2 79 496.671 89.385 10.057

Reflect and Review Paired Samples t-Test: Moon and Aggression (pg
24)
1. For this we selected moon and other as the variables. The measures of central tendency
(mean, median, and mode) are selected in the statistics tab. Distribution plot and Boxplot
with Outliers labeled is selected in the Plots Tab.

The number of aggressive disruptions seems much higher for the days with a full moon than
for other days. The Distribution plot shows that for a full moon day, the bar for 3-4
disruptions is higher. The distribution for other days has the highest bar at the far left (lower
number) and it decreases as we move to the right.

The Boxplots show that the mean for full moon days is higher than other days. We can also
see that the number of disruptions in the first quartile (more disruptions) in the other day
category is tightly grouped together. There are two outliers on the moon days, one has
higher disruption rates than the rest of the group on that day and the other has a much lower
disruption rate than the group. On the other days there are three outliers, all with much
higher disruption rates than the group.

Our hypothesis could be that on full moon days that the disruptions are actually much
higher. If we were to take out the outliers from the study, those differences might be even
greater.

2. The Student’s t-Test is appropriate to use since the Assumptions Check is not significant.

Test of Normality (Shapiro-Wilk)


W p
Moon - Other 0.913 0.148
Note. Significant results suggest a deviation from normality.
3. We reject the Null hypothesis. The t-Test shows that p < 0.001, so the differences of
disruptions on full moon days compared to other days is statistically significant. We get a
large effect size, Cohen’s d = 1.666, so the difference between the two groups are very large.

85
Paired Samples T-Test
Measure 1 Measure 2 t df p Mean Difference SE Difference Cohen's d
Moon - Other 6.452 14 < .001 2.433 0.377 1.666
Note. Student's t-test.

Reflect and Review One Sample t-Test: Weight Gain


1a. The mean was about 10 pounds gained with the increase in calories. The standard
deviation is pretty big, so the data is very spread out. If we are considering that the average
weight gain was predicted to be 16 pounds, the results in this study seem much smaller.

1b. The distribution plot does show that the higher weight gain counts are between 12 and
16 pounds, with the other weight gain values having nearly equal counts.

2a. The Student’s t-Test is appropriate since the Assumptions Check was not significant.

2b. We reject the Null hypothesis. The results are significantly different for this sample when
compared to the test value of 16 points. The p < 0.001 is far below our significance
threshold. The effect size Cohen’s d = 2.7, so the differences are large.

One Sample T-Test


95% CI for Sample Mean
t df p Sample Mean Lower Upper Cohen's d
Difference -5.823 15 < .001 10.409 8.362 12.455 2.710
Note. For the Student t-test, effect size is given by Cohen's d .
Note. For the Student t-test, location estimate is given by the sample mean d .
Note. For the Student t-test, the alternative hypothesis specifies that the mean is
different from 16.
Note. Student's t-test.

2c. The results would seem to refute that on average people who consume an extra 100
calories per day would gain an average of 16 pounds since the average gain was 10.4 pounds.
These results suggest that the average weight gain is less.

Review and Reflect 1 ANOVA: Response to Eye Color (pg 30)

86
1a. The mean scores when you could not see the eye color and when the model had blue
eyes was lower than the response to models with brown or green eyes. The standard
deviation seems similar across the groups.

1b. The Boxplot gives us a similar view of the data. The median is higher for brown and
green eye models when compared to blue eye models and not seeing eye color. There are not
any outliers in this data.

1c. We could state the hypothesis that people reacted more favorably to a product when the
models in the advertisement had brown or green eye color models when compared to blue
eyed models or when you could not see the model’s eye color.

2a. Using the ANOVA may be appropriate since there are not significant differences in
variations as shown by the Levene’s Test assumptions check. The Q-Q plot shows some
variation beyond normality, so the Kruskal-Wallis may also be conducted to see if the results
differ from the ANOVA.

Test for Equality of Variances (Levene's)


F df1 df2 p VS-MPR*
0.519 3.000 218.000 0.670 1.000
* Vovk-Sellke Maximum p -Ratio: Based on the p -value, the maximum possible odds in
favor of H₁ over H₀ equals 1/(-e p log( p )) for p ≤ .37 (Sellke, Bayarri, & Berger, 2001).

Q-Q Plot

2b. The p-value is 0.036, so the differences are statistically significant. The effect size (η²) is
0.038 indicating the small effect. We reject the Null hypothesis, but we need to look at the
Post Hoc tables as well.

87
ANOVA - Score
Cases Sum of Squares df Mean Square F p VS-MPR* η²
Group 24.420 3.000 8.140 2.894 0.036 3.063 0.038
Residual 613.139 218.000 2.813

Kruskal-Wallis Test
Factor Statistic df p
Group 8.663 3 0.034

2c. The difference in response to green eye models when compared to blue eyes or not being
able to see the model’s eyes (Down) are not statistically significant in the Post Hoc but
comes the closest. With the overall ANOVA model p-value equal to 0.036 and the small
effect size, we would expect the pairwise difference to be quite small.

The Dunn’s Post Hoc for data that does not rely on Normality does show some statistical
significance for Green eyes compared to Blue and Down. However, this significant does not
hold true across all the p-value corrections.

Post Hoc Comparisons - Group


Mean Difference SE t p tukey
Down Blue -0.087 0.333 -0.261 0.994
Brown -0.617 0.380 -1.622 0.368
Green -0.752 0.324 -2.321 0.096
Blue Brown -0.530 0.344 -1.544 0.413
Green -0.666 0.280 -2.376 0.085
Brown Green -0.135 0.335 -0.404 0.978
Note. P-value adjusted for comparing a family of 4

Dunn's Post Hoc Comparisons - Group


Comparison z Wi Wj p p bonf p holm
Down - Blue -0.134 97.537 99.239 0.447 1.000 0.702
Down - Brown -1.571 97.537 120.405 0.058 0.349 0.215
Down - Green -2.238 97.537 125.325 0.013 0.076 0.063
Blue - Brown -1.609 99.239 120.405 0.054 0.323 0.215
Blue - Green -2.432 99.239 125.325 0.008 0.045 0.045

88
Dunn's Post Hoc Comparisons - Group
Comparison z Wi Wj p p bonf p holm
Brown - Green -0.383 120.405 125.325 0.351 1.000 0.702

3. Given the mixed results of the ANOVA, Kruskal-Wallis, and the two Post Hoc analysis,
the conservative approach would be to “fail to reject the Null hypothesis” and consider the
responses to eye color not statistically significant. More testing would be needed.

Review and Reflect 2 ANOVA: Pain Thresholds (pg 32)


1a. The pain threshold mean for Dark Blond and Light Blond people is higher than for Light
Brunette and Dark Brunette. The standard deviation for Light Brunette pain thresholds is
much smaller than the other groups, so their results have less variation.

1b. The Boxplots show the same results as the Descriptive statistics. There is one outlier in
the Dark Brunette group with a much higher pain threshold than the rest of the group.

1c. We could state the hypothesis that in general that people with blonde hair have higher
pain thresholds than people with brunette hair.

2a. The Assumption Checks are not significant, so we can use the ANOVA for parametric
data.

2b. We reject the Null hypothesis. The ANOVA table shows that the differences are
statistically significant, p = 0.004 and the effect size of 0.576 indicates a large effect size.

ANOVA - Pain Tolerance


Cases Sum of Squares df Mean Square F p η²
Hair Color 1360.726 3 453.575 6.791 0.004 0.576
Residuals 1001.800 15 66.787
Note. Type III Sum of Squares

2c. The Post Hoc analysis shows us that the differences are between the pain thresholds for
Light Blond people when compared to Dark and Light Brunette people.

Post Hoc Comparisons - Hair Color


Mean Difference SE t Cohen's d p tukey
Dark Blond Dark Brunette 13.800 5.169 2.670 1.565 0.074
Light Blond -8.000 5.169 -1.548 -0.898 0.436

89
Post Hoc Comparisons - Hair Color
Mean Difference SE t Cohen's d p tukey
Light Brunette 8.700 5.482 1.587 1.105 0.415
Dark Brunette Light Blond -21.800 5.169 -4.218 -2.587 0.004
Light Brunette -5.100 5.482 -0.930 -0.705 0.789
Light Blond Light Brunette 16.700 5.482 3.046 2.267 0.037
Note. Cohen's d does not correct for multiple comparisons.

2d. From these results we might conclude that people with Light Blond hair have higher
pain thresholds when compared to people with other colored hair.

Exploration 1 ANOVA: Singers (pg 35)


1a. The mean for the signers' height, split by pitch, seem to be similar. They range from
about 65 inches to 69 inches. is 67 inches. The standard deviation also seems very similar for
each pitch group.

1b. In the distribution plot, the “very high pitch” singers have the majority of singers at 65
inches. The other pitch groups seem to have more spread-out heights across the distribution.
The box plot shows that the median height increases somewhat as we move from very high
pitch with the shortest median height, increasing to high pitch, then low pitch, and very low
pitch singers having the tallest median height.

1c. The data looks very similar across the various pitch groups. We could easily assume that
there are not really any statistical differences in height among the pitch groups.

2a. The Assumptions Checks are not significantly different from normality, so we should use
the ANOVA test.

2b. We reject the Null hypothesis since p<0.001 is statistically significant. The effect size of
0.079 indicates a medium effect.

ANOVA - Height
Cases Sum of Squares df Mean Square F p η²
Pitch 272.101 3 90.700 6.649 < .001 0.079
Residuals 3151.048 231 13.641
Note. Type III Sum of Squares

90
2c. The most pronounced differences are when we compare the “very high” pitch group’s
height to the “low and very low” group’s height. We also see a significant difference between
the heights of the “high” group and the “very low” group.

Post Hoc Comparisons - Pitch


Mean Difference SE t p tukey
1. very high 2. high -0.447 0.712 -0.628 0.923
3. low -1.995 0.651 -3.064 0.013
4. very low -2.695 0.705 -3.825 < .001
2. high 3. low -1.548 0.672 -2.303 0.100
4. very low -2.249 0.724 -3.104 0.011
3. low 4. very low -0.701 0.665 -1.055 0.717

2d. We could state signer’s height with very low pitches are significantly taller than signers
with very high and high pitch voices. Also, signers with very high pitch voices have
significantly shorter heights than singers with very low pitch voices.

Exploration 2 ANOVA: Titanic (pg 38)


1a. The mean age was about 30 years old; however, the median age was younger, 28 years
old, and the most frequent age was only 20 years old. The distribution plot shows a large
number of infants and most passengers between the ages of 20 to 30. There were few
passengers over 50.

1b. The distribution plot shows that the First-Class passengers ages are distributed between
about 20 to 60 years old in fairly equal numbers. The Second-Class passengers were mainly
in their twenties, and the Third-Class passengers were mainly between 15 – 30 years old. The
Boxplot shows a higher median age for First Class passenger compared to Second or Third
Class. The Second- and Third-Class passengers had quite a few outliers who were in their
60’s.

1c. I would guess that First Class were mainly wealthy families where the parents are older.
The Third-Class passengers may also be mainly families who were poor and the parents
tended to be younger. The Second-Class passengers seem to be mainly young adults.

2a. The Kruskal-Wallis test should be used since the Levene’s Test of Equal Variances is
significantly different from Normality. The Q-Q Plot did not show any significant shifts in
the data.

91
Test for Equality of Variances (Levene's)
F df1 df2 p
18.374 2.000 753.000 < .001

2b. We would reject the Null hypothesis. The differences in age among passengers in the
various Cabin Classes are statistically significant, with p < 0.001.

Kruskal-Wallis Test
Factor Statistic df p
PClass 128.030 2 < .001

2c. The Post Hoc table tells us that the First-Class Cabin passenger’s ages were significantly
different than the ages of those in Second- and Third-Class cabins. They tended to be much
older.

Post Hoc Comparisons - PClass


Mean Difference SE t p tukey
1st 2nd 11.368 1.230 9.243 < .001
3rd 14.459 1.119 12.920 < .001
2nd 3rd 3.092 1.141 2.711 0.019

2d. We see that First-Class passengers were older. This could be because a First-Class Cabin
cost so much more and a person needed to be more experienced or successful to afford to
travel in First Class. It could still be true, as noted in the Descriptives that First Class were
mainly wealthy families where the parents are older. The Third-Class passengers may also be
mainly families who were poor and the parents tended to be younger. The second-Class
passengers seem to be mainly young adults.

Review and Reflect Correlation: Exam Anxiety (pg. 42)


1. There is a strong negative correlation between hours spent studying (Revise) and a
student’s anxiety about the exam (Anxiety), with a correlation coefficient r = -0.709. Time
studying (Revise) and exam grades (Exam) and a moderate positive correlation, with a
correlation coefficient of r = 0.397. The exam grades (Exam) and a student’s test anxiety
(Anxiety) have a moderate negative correlation, with a correlation coefficient of r = -0.441.

92
Pearson Correlations
Pearson's r p Lower 95% CI Upper 95% CI
Revise - Exam 0.397 < .001 0.220 0.548
Revise - Anxiety -0.709 < .001 -0.794 -0.598
Exam - Anxiety -0.441 < .001 -0.585 -0.271

2. The scatterplot points for anxiety and revise cluster around the line of best fit well. They
are close to the line. As we look at the scatterplot points for exam and studying as well as
exam and anxiety cluster near the line of best fit, but there are more points farther away
from the line.

We could state that there is a strong relationship between anxiety and studying, in that the
more one studies, the lower their anxiety about the exam. There is also a relationship
between studying and the exam grade. As a student studies more, their exam grades tend to
be higher. And finally, there is a relationship between the exam grade and anxiety. The more
anxiety a student has about the exam, the lower their exam grades tends to be.

Exploration 1 Correlation: Album Sales (pg 44)


1. We see from the table that there is a moderate positive correlation between the
advertisement spending and album sales (r = 0.578) as well as a moderate positive
correlation between airplay of the songs and album sales (r = 0.599). There is a very weak
correlations between airplay and advertisement spending as well as weak to very weak
correlations between the perceived attractiveness of the band and the other variables.

Pearson Correlations
sales adverts airplay attract
Pearson's r —
sales
p-value —
Pearson's r 0.578 —
adverts
p-value < .001 —
Pearson's r 0.599 0.102 —
airplay
p-value < .001 0.076 —
Pearson's r 0.326 0.081 0.182 —
attract
p-value < .001 0.128 0.005 —
Note. all tests one-tailed, for positive correlation

93
2. We can see from the scatterplots that the points for album sales-advertisements cluster
near the line of best fit. Also, the scatterplots that the points for album sales-airplay cluster
near the line of best fit. The other scatterplots seem to have the points very scattered and
they do not cluster near the lone very well.

The most important correlation that impacts album sales seems to be airplay and advertising
for the album. The other variables are less important.

Exploration 2 Correlation: College Success (pg 46)


1. In general we find moderate positive correlation among the high school grades (hss, hse,
hsm). There is also a moderate positive correlation between a student’s gpa and their grades
in the high school courses (hss, hse, hsm). The SAT scores (satm, satv) have a moderate
positive correlation. The SAT scores (satm, satv) has weak positive correlations with the high
school measures (gpa, hss, hsm, hse).

Correlation Table
gpa hsm hss hse satm satv
Pearson's r —
p-value —
gpa
Spearman's rho —
p-value —
Pearson's r 0.436 —
p-value < .001 —
hsm
Spearman's rho 0.463 —
p-value < .001 —
Pearson's r 0.329 0.576 —
p-value < .001 < .001 —
hss
Spearman's rho 0.395 0.587 —
p-value < .001 < .001 —
Pearson's r 0.289 0.447 0.579 —
p-value < .001 < .001 < .001 —
hse
Spearman's rho 0.316 0.483 0.598 —
p-value < .001 < .001 < .001 —
Pearson's r 0.252 0.454 0.240 0.108 —
p-value < .001 < .001 < .001 0.106 —
satm
Spearman's rho 0.272 0.446 0.237 0.110 —
p-value < .001 < .001 < .001 0.102 —
satv Pearson's r 0.114 0.221 0.262 0.244 0.464 —

94
Correlation Table
gpa hsm hss hse satm satv
p-value 0.087 < .001 < .001 < .001 < .001 —
Spearman's rho 0.155 0.218 0.271 0.274 0.403 —
p-value 0.021 0.001 < .001 < .001 < .001 —

2. The scatterplot for gpa and satm as well as the scatterplot for gpa and satv stand out the
most. The points in both graphs have a large circular pattern around the line of best fit. In
general, we could state that a student’s gpa average correlated well with high school grades.
SAT scores to not have a very strong relationship (correlation) with a student’s gpa average.

Review and Reflect Simple Linear Regression: Album Sales (pg 49)
1a. The Model Summary table gives us the R2 value, the amount of variation in the
dependent variable that can be attributed to the independent variable. About 33.5% of the
variation in album sales can be attributed to the advertising spending. This is fairly large,
stating that one-third of the changes in sales can be tracked back to the advertisement
spending.

Model Summary
Model R R² Adjusted R² RMSE
1 0.578 0.335 0.331 65.991

1b. We reject the Null hypothesis. The relationship between album sales and advertising
spending is statistically significant (p < 0.001). The p-value is below our critical value of 0.05.

ANOVA
Model Sum of Squares df Mean Square F p
1 Regression 433687.833 1 433687.833 99.587 < .001
Residual 862264.167 198 4354.870
Total 1.296e +6 199

1c. The coefficients table gives us the p-value for advertisement spending in relation to
album sales as p < 0.001, which is statistically significant. The “Unstandardized” coefficient
value for adverts is like the slope of a linear equation describing this model. The coefficient
is 0.096. The notes in this output state that we could describe a change in album sales as for
every 1000 additional pounds spend, we could expect an added 96 album sales (1000 X 0.096

95
= 96) for every 1000 British pounds spent on advertising. We could have stated that for
every 100 pounds spend that we could expect an additional 9.6 album sales, but 0.6 of an
album does not really make much sense in the real context of selling albums.

Coefficients
Model Unstandardized Standard Error Standardized t p
1 (Intercept) 134.140 7.537 17.799 < .001
adverts 0.096 0.010 0.578 9.979 < .001

Review and Reflect Multiple Linear Regression: Album Sales (pg 51)
1a. Model 1 includes the three variables (adverts, airplays, and attractiveness). Here we find
that these variables can account for about 66% of the variation in album sales. In our
previous Simple Linear Regression, and as shown in Model 0 that includes advertisements,
the money spent on advertisements could account for about 33% of the variation. So, by
including these two new variables we are adding over 30% of the explanation to the new
model over the adverts alone.

Model Summary
Model R R² Adjusted R² RMSE R² Change F Change df1 df2 p
0 0.578 0.335 0.331 65.991 0.335 99.587 1 198 < .001
1 0.815 0.665 0.660 47.087 0.330 96.447 2 196 < .001
Note. Null model includes adverts

1b. We reject the Null hypothesis. The ANOVA table tells us that the overall model is
statistically significant with p < 0.001.

ANOVA
Model Sum of Squares df Mean Square F p
H₁ Regression 433687.833 1 433687.833 99.587 < .001
Residual 862264.167 198 4354.870
Total 1.296e +6 199
Note. The intercept model is omitted, as no meaningful information can be shown.

1c. The statistical significance can be found in the Coefficients table for each predictor. Here
we find that all three predictors are statistically significant, p < 0.001.

96
Coefficients
9500% CI Collinearity Statistics
Model Unstandardized Standard Error Standardized t p Lower Upper Tolerance VIF
0 (Intercept) 134.140 7.537 17.799 < .001 NaN NaN
adverts 0.096 0.010 0.578 9.979 < .001 NaN NaN 1.000 1.000
1 (Intercept) -26.613 17.350 -1.534 0.127 NaN NaN
adverts 0.085 0.007 0.511 12.261 < .001 NaN NaN 0.986 1.015
airplay 3.367 0.278 0.512 12.123 < .001 NaN NaN 0.959 1.043
attract 11.086 2.438 0.192 4.548 < .001 NaN NaN 0.963 1.038

The regression model suggests that to predict album sales that the record company needs to
have airplay time on the radio, spend money on the advertising of the album, and work on
the band’s image with fans.

Advertisements is expressed in 1000 British pounds, so if the other variables were held
equal, we would expect an increase of 85 albums selling per 1000 pounds spent.

Airplay is expressed in additional times the song is played per week prior to the album. So, if
the other variables were held equal, we would expect an increase of 3 albums selling for each
additional time the song was played on the radio that week.

Attractiveness of the band was expressed as a scale from 1-10. So, if the other variables were
held equal, we would expect that with each increase of “1” on the scale that we would see an
increase of 11 albums selling.

Exploration 1 Simple and Multiple Regression: Auction (pg 53)


1. The correlation matrix shows some of our initial impressions from the Descriptives. Price
and age have a strong positive correlation while price-bidders has a weal positive correlation.
We also notice that age-bidders seems to have a weak negative correlation.

Pearson Correlations
Age Bidders Price
Pearson's r —
Age
p-value —
Pearson's r -0.254 —
Bidders
p-value 0.161 —
Pearson's r 0.730 0.395 —
Price
p-value < .001 0.025 —

97
2a. The Model Summary table tells us that 53.3% of the variation in the clock’s price is
accounted for by the age of the clock. So, the age of the clock can be attributed to about
53.3% of changes in the clock’s auction price.

Model Summary
Model R R² Adjusted R² RMSE
1 0.730 0.533 0.518 273.028

2b. The regression model is statistically significant. The p-value < 0.001 is below our
threshold of 0.05.

ANOVA
Model Sum of Squares df Mean Square F p
1 Regression 2.555e +6 1 2.555e +6 34.273 < .001
Residual 2.236e +6 30 74544.507
Total 4.791e +6 31

2c. The Coefficients table tells us that the variable “Age” is a statistically significant predictor
for the clock’s selling price. We could state that for every year older for the clock’s age, we
should see the final selling price increase by 10 pounds.

Coefficients
Model Unstandardized Standard Error Standardized t p
1 (Intercept) -191.658 263.887 -0.726 0.473
Age 10.479 1.790 0.730 5.854 < .001

3a. The model summary table tells us that the number of bidders and the age of the clock
accounts for about 89% of the final selling price for the clock. This is an improvement over
the simple linear model with just the clock’s age accounting for 53.3% of the variation, as
shown in the H0 row.

Model Summary - Price


Model R R² Adjusted R² RMSE
H₀ 0.730 0.533 0.518 273.028
H₁ 0.945 0.893 0.885 133.137
Note. Null model includes Age

98
3b. The model is statistically significant in predicting the clock selling price, p < 0.001.

ANOVA
Model Sum of Squares df Mean Square F p
1 Regression 4.277e +6 2 2.139e +6 120.651 < .001
Residual 514034.515 29 17725.328
Total 4.791e +6 31

3c. The Coefficients tells us that each variable, age of clock and number of bidders, is a
statistically significant predictor for the final selling price of the clock.

Coefficients
Model Unstandardized Standard Error Standardized t p
H₀ (Intercept) -191.658 263.887 -0.726 0.473
Age 10.479 1.790 0.730 5.854 < .001
H₁ (Intercept) -1336.722 173.356 -7.711 < .001
Age 12.736 0.902 0.888 14.114 < .001
Bidders 85.815 8.706 0.620 9.857 < .001

The multiple linear regression model actually gives us a more complete view of the context
of an auction. Our model takes into account both the age of the clock and the number of
people bidding on the clock. If you have ever been to an auction then you know firsthand
that these two variables can have an impact of the atmosphere, mood, and action during the
bidding.

The model suggests that if the other variables were held constant that for each new bidder
that the clock’s price increases by 85 pounds. In addition, if the other variables were held
constant that we could expect that for each additional year of age that the final selling price
increase another 12 pounds.

Exploration 2 Simple and Multiple Regression: Exam Anxiety (pg 56)


1a. The Model Summary shows us that study time (Revise) can account for about 15.7% of
the variation in the exam grade.

99
Model Summary
Model R R² Adjusted R² RMSE
1 0.397 0.157 0.149 23.929

1b. The model is statistically significant, p < 0.001.

ANOVA
Model Sum of Squares df Mean Square F p
1 Regression 10802.625 1 10802.625 18.865 < .001
Residual 57834.579 101 572.620
Total 68637.204 102

1c. The Coefficients table shows us that the variable of study time (Revise) is a statistically
significant predictor for the exam grade. For each additional hour of studying, the student’s
exam grade should increase by 0.5%

Coefficients
Model Unstandardized Standard Error Standardized t p
1 (Intercept) 45.321 3.503 12.938 < .001
Revise 0.567 0.130 0.397 4.343 < .001

2a. The Model Summary table tells us that this regression model of anxiety and study hours
accounts for about 20.9%, shown in row H1, of the variation in exam grades. This is a slight
improvement over the simple regression with only study hours which accounted for about
15.7% of the variation, as shown in row H0.

Model Summary - Exam


Model R R² Adjusted R² RMSE
H₀ 0.397 0.157 0.149 23.929
H₁ 0.457 0.209 0.193 23.306
Note. Null model includes Revise

2b. The model is statistically significant, p < 0.001.

100
ANOVA
Model Sum of Squares df Mean Square F p
1 Regression 14321.514 2 7160.757 13.184 < .001
Residual 54315.690 100 543.157
Total 68637.204 102

2c. In the Coefficients table we see that anxiety is a statistically significant predictor of exam
grade, however study hours (Revise) is not a statistically significant predictor in this multiple
regression model that includes both variables.

Coefficients
Model Unstandardized Standard Error Standardized t p
1 (Intercept) 87.833 17.047 5.152 < .001
Revise 0.241 0.180 0.169 1.339 0.184
Anxiety -0.485 0.191 -0.321 -2.545 0.012

In this model, our coefficients seem to suggest that for each increase on the anxiety scale
that a student rates themselves then the grade should decrease by 0.4%. We also see that for
each additional hour spent studying that the exam grade should increase by 0.2%, but keep
in mind that this model states that the study time variable (Revise) is not a significant
predictor, so we cannot really include this as part of the model.

What is going on here.

The issue arises when we do not take the context of these variables into consideration. From
our correlation matrix, the study time (Revise) and test anxiety (Anxiety) had an inverse
relationship. As a student studies more for the exam then their test anxiety should decrease.
Our model is predicting the exam grade for each student form these two variables that are in
opposition to one another. They tend to counteract or counterbalance one another.

We could state that the model is not accurate in predicting the exam grade for each
participate in the study, since the two variables have opposite effects on the grade. We could
also state that test anxiety is a stronger predictor of the final exam grade than study time,
when both are used in the model. In the correlation matrix, the exam-anxiety pair had a
stronger correlation than the exam-revise pair.

2d. The Model Summary table tells us that this regression model of anxiety and study hours
accounts for about 20.9%, shown in row H1, of the variation in exam grades. This is a slight

101
improvement over the simple regression with only study hours which accounted for about
15.7% of the variation, as shown in row H0.

Correlation & Regression Decision Making (pg 59)


1. There is a strong negative correlation between hours spent studying (Revise) and a
student’s anxiety about the exam (Anxiety), with a correlation coefficient r = -0.709. Time
studying (Revise) and exam grades (Exam) and a moderate positive correlation, with a
correlation coefficient of r = 0.397. The exam grades (Exam) and a student’s test anxiety
(Anxiety) have a moderate negative correlation, with a correlation coefficient of r = -0.441.
Since Exam-Revise and Exam-Anxiety suggest weak correlations, we should not consider
them as worth investigating further. Revise-Anxiety have a strong correlation, suggesting that
we could model the relationship with a regression.

Pearson Correlations
Pearson's r p Lower 95% CI Upper 95% CI
Revise - Exam 0.397 < .001 0.220 0.548
Revise - Anxiety -0.709 < .001 -0.794 -0.598
Exam - Anxiety -0.441 < .001 -0.585 -0.271

2a. The Model Summary shows that 50% of the variation in a student’s anxiety rating can be
accounted for by the time they spent studying.

Model Summary - Anxiety


Model R R² Adjusted R² RMSE
H₀ 0.000 0.000 0.000 17.182
H₁ 0.709 0.503 0.498 12.172

2b. The model is statistically significant, p < 0.001.

ANOVA
Model Sum of Squares df Mean Square F p
H₁ Regression 15147.404 1 15147.404 102.233 < .001
Residual 14964.654 101 148.165
Total 30112.058 102
Note. The intercept model is omitted, as no meaningful information can be shown.

102
2c. The Coefficients table shows that for every hour spent studying that a student’s anxiety
will be reduced by 0.6 points.

Coefficients
Model Unstandardized Standard Error Standardized t p
H₀ (Intercept) 74.344 1.693 43.913 < .001
H₁ (Intercept) 87.668 1.782 49.200 < .001
Revise -0.671 0.066 -0.709 -10.111 < .001

Review and Reflect 2 Chi Square Analysis: Dancing Cats & Dogs (62)
1. The first Descriptives results of Dancing split by Animal shows that more cats DID NOT
learn to dance than those that did learn to dance. We see the opposite with dogs with more
dogs learning to dance than not learning to dance.

The second Descriptives results of Dancing split by Training shows that more animals DID
NOT learn to dance when Affection was used as a reward. We see the opposite with Food
used as a reward with more animals learning to dance than not learning to dance.

2. The Chi-square test “rejects the null hypothesis” that there are not any differences in
animals learning to dance and the training method. With cats we have a p-value of < 0.001,
however the dog p-value of 0.047 should be considered “marginally significant and results
should be reviewed cautiously.

Chi-Squared Tests
Animal Value df p
Χ² 25.356 1 < .001
Cat
N 200
Χ² 3.932 1 0.047
Dog
N 70
Χ² 16.386 1 < .001
Total
N 270

103
3. The Contingency Table has higher than expected numbers of cats who learned to dance
with food as a reward and higher than expected counts of cats who did not learn to dance
when given affection as a reward. The observed counts and expected counts for dogs is
much closer which is probably why the p-value was marginally significant.

Contingency Tables
Dance
Animal Training No Yes Total
Count 114.000 48.000 162.000
Cat Affection as Reward
Expected count 100.440 61.560 162.000
Count 10.000 28.000 38.000
Food as Reward
Expected count 23.560 14.440 38.000
Count 124.000 76.000 200.000
Total
Expected count 124.000 76.000 200.000
Count 7.000 29.000 36.000
Dog Affection as Reward
Expected count 10.800 25.200 36.000
Count 14.000 20.000 34.000
Food as Reward
Expected count 10.200 23.800 34.000
Count 21.000 49.000 70.000
Total
Expected count 21.000 49.000 70.000
Count 121.000 77.000 198.000
Total Affection as Reward
Expected count 106.333 91.667 198.000
Count 24.000 48.000 72.000
Food as Reward
Expected count 38.667 33.333 72.000
Count 145.000 125.000 270.000
Total
Expected count 145.000 125.000 270.000

4. We could summarize these results by stating that cats are more motivated to learn through
the use of food as a reward than they are when affection is used as a reward. We could also
note that while more dogs learned to dance than not, the results are less clear about the
training method.

Review and Reflect 1 Chi Square Analysis: Health Habits (pg 64)

104
1. The Distribution plots show that for each group, the majority of people within each group
had low fruit consumption. The Vigorous Physical Activity group had fairly equal numbers
of moderate and high fruit consumption. The Low Physical Activity group did seem to have
very few people with high fruit consumption habits.

2. The differences in fruit consumption and physical activity are statistically significant, p =
0.007, with a small effect size.

Chi-Squared Tests
Value df p VS-MPR
Χ² 14.152 4 0.007 10.809
N 1184

Nominal
Valueᵃ
Phi-coefficient NaN
Cramer's V 0.077

3. In the table we can notice that the low activity group displayed more than expected low
fruit consumption and less than expected high fruit consumption. The Vigorous activity
group shows more than expected high fruit consumption.

Contingency Tables
Fruit Consumption
Physical Activity Low Medium High Total
Count 69.000 25.000 14.000 108.000
Low Expected count 51.902 29.280 26.818 108.000
% within row 63.889 % 23.148 % 12.963 % 100.000 %
Count 206.000 126.000 111.000 443.000
Moderate Expected count 212.894 120.104 110.002 443.000
% within row 46.501 % 28.442 % 25.056 % 100.000 %
Count 294.000 170.000 169.000 633.000
Vigorous Expected count 304.204 171.616 157.181 633.000
% within row 46.445 % 26.856 % 26.698 % 100.000 %
Count 569.000 321.000 294.000 1184.000
Total
Expected count 569.000 321.000 294.000 1184.000

105
Contingency Tables
Fruit Consumption
Physical Activity Low Medium High Total
% within row 48.057 % 27.111 % 24.831 % 100.000 %

4. The JASP notes state that “The Chi-squared test of independence rejects the null
hypothesis that Physical Activity and Fruit Consumption are unrelated”. This could be
summarized by stating that people with low physical activity tended to eat less fruit and
people with vigorous activity levels tended to eat more fruit.

Review and Reflect Binomial Test: Sun Block Lotions (pg 68)
1. The test value was set at “0.5” to represent the 50-50 chance that a person would choose
one sun block over the other based on the packaging. Just by chance each product should
have been randomly selected 50% of the time.

2. Since the test value was set to 0.5, or a 50% chance, we can examine either row of the
table. Here we find that the results of counts of 7 and 13, or 35% and 65%, are not
statistically significant from the 50% chance selection (p = 0.263).

Binomial Test
95% CI for Proportion
Variable Level Counts Total Proportion p Lower Upper
Product Theirs 7 20 0.350 0.263 0.154 0.592
Yours 13 20 0.650 0.263 0.408 0.846
Note. Proportions tested against value: 0.5.

3. The two plots show the confidence interval range for each product selection
(Theirs/Yours). Each one overlaps the test value of .5 or 50%.

106
4. We could state that the packaging of the sun block did not influence a person’s choice any
more than chance.

Explore Binomial Test: Dancing Cats and Dogs (pg 70)


1. We chose 0.5 as the test value to represent a 50% chance that the dogs and cats would
learn to dance.

**Just a note: If there is other information about the likelihood of an animal learning
to dance then we could use a different test value. Perhaps some previous studies
suggest that 20% of dogs and cats just start dancing. We could change the test variable
to 0.2 in the Binomial test settings.

What percentage of dogs and cats do you think would dance? Try this in a new model.

2. Since the test value was set to 0.5, or a 50% chance, we can examine either row of the
table. Here we find that the results of counts of 145 and 125, or 54% and 46%, are not
statistically significant from the 50% chance selection (p = 0.248).

Binomial Test
Variable Level Counts Total Proportion p
Dance No 145 270 0.537 0.248
Yes 125 270 0.463 0.248
Note. Proportions tested against value: 0.5.

107
3. Perhaps we have some studies that show animals (dogs and cats) learn a new trick 2/3 of
the time, so they do not learn a new trick 1/3 of the time or 33%. This type of evidence
would support changing the Test Value in the model.

4. In this case we find that the results are statistically significant and that the percentage of
animals that did not learn to dance was higher than 33%. In fact, we find that in this sample,
53.7% of the animals did not learn to dance.

Binomial Test
Variable Level Counts Total Proportion p
Dance No 145 270 0.537 < .001
Yes 125 270 0.463 < .001
Note. Proportions tested against value: 0.33.

Exploration 1 Point Biserial Correlation: Invisibility Cloak (pg 73)


1a. The correlation matrix shows a moderate positive correlation between mischief and
having an invisibility cloak. We should also note that the p-value is not statistically
significant.

Pearson Correlations
Mischief Cloak
Pearson's r —
Mischief
p-value —
Pearson's r 0.343 —
Cloak
p-value 0.101 —

1b. The moderate correlation that is not statistically significant means that having an
invisibility cloak or not did not show a relationship to how much mischief someone tried to
get away with during the day.

Exploration 2 Point Biserial Correlation: Invisibility Cloak (pg 75)

108
1a. The correlation matrix shows a moderate positive correlation between the creativity score
and being a first-time contestant. We should also note that the p-value is not statistically
significant.

Pearson's Correlations
Variable Creativity Novice
1. Creativity Pearson's r —
p-value —
2. Novice Pearson's r -0.261 —
p-value 0.032 —

1b. The moderate correlation that is not statistically significant means that having been a
first-time contestant (Novice) did not show a relationship the creativity rating someone
received.

109
Thank you for going on this mathematical
journey and exploring the world of quantitative
analysis.

110

You might also like