bayesian data analysis using jaspa scientific theory is nota repeatable procedure, and cannot be...
TRANSCRIPT
![Page 1: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/1.jpg)
Bayesian data analysis using JASP
compcogscisydney.com/jasp-tute.html
Dani Navarro
![Page 2: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/2.jpg)
Part 1: Theory
• Philosophy of probability• Introducing Bayes rule• Bayesian reasoning• A simple example• Bayesian hypothesis testing
Part 2: Practice
• Introducing JASP• Bayesian ANOVA• Bayesian t-test• Bayesian regression• Bayesian contingency tables• Bayesian binomial test
![Page 3: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/3.jpg)
1.1 Philosophy of probability
![Page 4: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/4.jpg)
Idea #1: “Aleatory” processes
Probability is an objective characteristic associated with physical processes, defined by counting the relative frequencies of different kinds of events when that process is invoked
![Page 5: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/5.jpg)
“Aleatory” processes
![Page 6: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/6.jpg)
![Page 7: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/7.jpg)
![Page 8: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/8.jpg)
Frequentist statistics
Coin flipping is an aleatory process, and can be repeated as many times as you like
The probability of a head is defined as the long-run frequency
![Page 9: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/9.jpg)
Frequentist statistics
A particle physics experiment is a repeatable procedure, and thus a frequentist probability can be constructed to describe its outcomes
A scientific theory is not a repeatable procedure, and cannot be assigned a probability: there is no such thing as “the probability that my theory is true”
![Page 10: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/10.jpg)
Idea #2: “Epistemic” uncertainty
?
Probability is an subjective characteristic associated with rational agents, defined by assessing the strength of belief that the agent holds in different propositions
? ??
![Page 11: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/11.jpg)
“Bayesian” statistics
A particle physics experiment generates observable events about which a rational agent might hold beliefs
A scientific theory contains a set of propositions about which a rational agent might hold beliefs
Probabilities can be attached to any proposition that an agent can believe
![Page 12: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/12.jpg)
1.2 Introducing Bayes rule
![Page 13: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/13.jpg)
Roll two dice…
![Page 14: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/14.jpg)
Thirty six possible cases
![Page 15: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/15.jpg)
Three cases where the dice add up to 4
![Page 16: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/16.jpg)
The three cases where the result adds up to 4
All 36 cases organised by outcome
![Page 17: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/17.jpg)
Roll 2 3 4 5 6 7 8 9 10 11 12
N 1 2 3 4 5 6 5 4 3 2 1
![Page 18: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/18.jpg)
Roll 2 3 4 5 6 7 8 9 10 11 12
N 1 2 3 4 5 6 5 4 3 2 1
Prob .028 .056 .083 .111 .139 .167 .139 .111 .083 .056 .028
Probability = 3/36 = .083
![Page 19: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/19.jpg)
A: “at least one die has a value of 2”
P (A) =11
36= .31
![Page 20: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/20.jpg)
B: “the total is at least six”
P (B) =26
36= .72
![Page 21: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/21.jpg)
P (B|A) =P (B)⇥ P (A|B)
P (A)
Probability that the total is at least 6
= 26/36
![Page 22: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/22.jpg)
P (B|A) =P (B)⇥ P (A|B)
P (A)
Probability that the total is at least 6
= 26/36
Probability that at least one die has a 2
= 11/36
![Page 23: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/23.jpg)
P (B|A) =P (B)⇥ P (A|B)
P (A)
Probability that the total is at least 6
= 26/36= 6/26
Probability that at least one die has a 2 given that the total is at least 6
Probability that at least one die has a 2
= 11/36
![Page 24: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/24.jpg)
P (B|A) =P (B)⇥ P (A|B)
P (A)
= 6/11
Probability that the total is at least 6 given that at least one die has a 2
Probability that the total is at least 6 Probability that at least one die has a 2 given that the total is at least 6
Probability that at least one die has a 2
= 26/36= 6/26
= 11/36
![Page 25: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/25.jpg)
P (B|A) =P (B)⇥ P (A|B)
P (A)
Probability that the total is at least 6 given that at least one die has a 2
Probability that the total is at least 6 Probability that at least one die has a 2 given that the total is at least 6
Probability that at least one die has a 2
= 26/36= 6/26
= 11/36= 6/11
![Page 26: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/26.jpg)
Let’s check that:
26
36⇥ 6
26÷ 11
36=
26
36⇥ 6
26⇥ 36
11=
6
11
P (B|A)
P (B) P (A)
P (A|B)
![Page 27: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/27.jpg)
Let’s check that:
26
36⇥ 6
26÷ 11
36=
26
36⇥ 6
26⇥ 36
11=
6
11
P (B|A)
P (B) P (A)
P (A|B)
![Page 28: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/28.jpg)
1.3 Bayesian reasoning
![Page 29: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/29.jpg)
P (B|A) =P (B)⇥ P (A|B)
P (A)
6/11
26/36 6/26
11/36
Bayes’ rule is a mathematical fact that probabilities must obey
![Page 30: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/30.jpg)
P (B|A) =P (B)⇥ P (A|B)
P (A)
Bayesian reasoning happens when we combine this mathematical rule with
epistemic probability
![Page 31: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/31.jpg)
For example…
h = A hypothesis about the world
d = Some observable data
![Page 32: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/32.jpg)
… given that I have observed these data?
How strongly should I believe in this hypothesis…
![Page 33: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/33.jpg)
P (h|d) = P (d|h)⇥ P (h)
P (d)
The posterior probability that my hypothesis is true given that I have observed these data…
h|d
![Page 34: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/34.jpg)
P (h|d) = P (d|h)⇥ P (h)
P (d)
The prior probability that I assigned to this hypothesis before observing the data
h
![Page 35: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/35.jpg)
P (h|d) = P (d|h)⇥ P (h)
P (d)
The likelihood that I would have observed these data if the hypothesis is true
d|h
![Page 36: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/36.jpg)
P (h|d) = P (d|h)⇥ P (h)
P (d)
The “marginal” probability of observing these particular data (more on this shortly)
d
![Page 37: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/37.jpg)
Prior beliefs Posterior beliefs
Data
Belief revision!
![Page 38: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/38.jpg)
P(h) : the prior probabilitythat h is true
P(d) : discussed later
P(d|h) : the likelihood of observing d if h is true
P(h|d) : the posterior probability that h is true
![Page 39: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/39.jpg)
1.4 Example of Bayesian reasoning
![Page 40: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/40.jpg)
Many possibilities
dropped a wine glass broke a window psychic explosion
earthquake a wizard did it
etc…
![Page 41: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/41.jpg)
Let’s compare two of them
I dropped a wine glass Kids broke the window
![Page 42: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/42.jpg)
“Prior odds”
P (h1)
P (h2)= = 0.1
Before learning anything else I think “wine glass dropping” is 10 times more plausible than “broken window”
![Page 43: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/43.jpg)
Some data
There is a cricket ball next to the broken glass
![Page 44: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/44.jpg)
Likelihood of the data
When I drop a wine glass…
… It’s very unlikely that I just happen to do so right next to a cricket ball
P(d|h) = 0.001
![Page 45: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/45.jpg)
Likelihood of the data
When the kids break a window…
… It’s not at all uncommon for a cricket ball to end up near the glass
P(d|h) = 0.15
![Page 46: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/46.jpg)
Bayes factor (a.k.a. likelihood ratio)
P (d|h1)
P (d|h2)= = 150
0.15
0.001=
I think it is 150 times more likely that I would find a cricket ball when a window breaks than when a wine glass is broken
![Page 47: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/47.jpg)
Posterior odds
P (h1|d)P (h2|d)
=P (d|h1)
P (d|h2)⇥ P (h1)
P (h2)Posterior odds Likelihood ratio Prior odds
= 150 = .1= 15
In light of the evidence, I now think the window-breaking hypothesis is 15 times more likely than the wine-glass hypothesis
![Page 48: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/48.jpg)
1.5 Bayesian hypothesis testing
![Page 49: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/49.jpg)
8 red
2 black
Is this roulette wheel unbalanced?
We’re ignoring the zero
![Page 50: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/50.jpg)
8 red
2 black
Null model,
The roulette wheel has an equal probability of producing red and black
h0
![Page 51: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/51.jpg)
8 red
2 black
Null model,
The roulette wheel has an equal probability of producing red and black
Alternative model,
The roulette wheel has a bias, but we don’t know what it is
h0
h1
![Page 52: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/52.jpg)
The null model places all its prior belief on P(red) = .5
0 10.5
P(red)
P (✓|h0)
Let’s pretend that there’s no such thing as “continuous numbers”, and act as if the only possible values for P(red) are 0, 0.1, 0.2, …, 1.0 J
We think of each hypothesis as a Bayesian who holds prior beliefs that map onto the hypothesis
Null hypothesis
![Page 53: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/53.jpg)
The null model places all its prior belief on P(red) = .5
0 10.5
P(red)
P (✓|h0)
The alternative model spreads its prior belief equally across all possibilities
0 10.5
P(red)
P (✓|h1)
Null hypothesis Alternative hypothesis
![Page 54: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/54.jpg)
Likelihoods … the probability of the data given every possible value of P(red)
0 10.8
P(red)
P (d|✓)
![Page 55: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/55.jpg)
Null
⇥ =
Prior Likelihood
The null hypothesis assigns prior probability 0 to the possibility that P(red) = 0.8 …
… so even though it assigns highest likelihood to the observed data ….
… it contributes nothing to the a priori “prediction” made by the null
P (d|✓)P (✓|h)
h0
![Page 56: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/56.jpg)
Null
⇥ =
Prior Likelihood
The null hypothesis assigns prior probability 1 to the possibility that P(red) = 0.5 …
… so even though it assigns a pretty small likelihood to the observed data ….
… it is the only contributor to the prediction made by this model
P (d|✓)P (✓|h)
h0
![Page 57: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/57.jpg)
Null
⇥ =
Prior Likelihood
Summing these values gives the marginal probability of the data under the null hypothesis...
i.e., how likely did the null model “think” we were to observe this specific pattern of data?
![Page 58: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/58.jpg)
Null
Alternative
⇥
⇥
=
=
Prior Likelihood Marginal probability of the data according to both modelsP (d|✓)P (✓|h)
h0
h1
P (d|h0)
P (d|h1)
![Page 59: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/59.jpg)
Bayes factor
P (d|h0)
P (d|h1)
BF10 =P (d|h1)
P (d|h0)=
P✓ P (d|✓)⇥ P (✓|h0)P✓ P (d|✓)⇥ P (✓|h1)
= 1.87
8 red
2 black
Null model
The roulette wheel has an equal probability of producing red and black
Alternative model
The roulette wheel has a bias, but we don’t know what it is
h0
h1
… evidence of about 2:1 in favour of the alternative
Data Models
![Page 60: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/60.jpg)
2.1 Just another stats packagehttps://jasp-stats.org
![Page 61: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/61.jpg)
![Page 62: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/62.jpg)
Illustrating the JASP workflow
File > Openopen a CSV fileCommon > Descriptives descriptive statisitics
Common > ANOVA > ANOVArun a frequentist ANOVA
File > Save Assave data and results to JASP file
What? Where?
![Page 63: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/63.jpg)
Here’s a real data set with many variables!
tutedataall.xlsx
JASP isn’t (currently?) good for computing new variables, so it’s best to do that in Excel or whatever you prefer
![Page 64: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/64.jpg)
For simplicity I’ll use small CSV files with only the relevant variables
tutedata1.csv
![Page 65: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/65.jpg)
File > Open
![Page 66: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/66.jpg)
Common
![Page 67: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/67.jpg)
Common > Descriptives
![Page 68: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/68.jpg)
Common > ANOVA
![Page 69: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/69.jpg)
Common > ANOVA > ANOVA
![Page 70: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/70.jpg)
Common > ANOVA > ANOVA
![Page 71: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/71.jpg)
Common > ANOVA > ANOVA > Descriptive Plots
![Page 72: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/72.jpg)
Common > ANOVA > ANOVA > Descriptive Plots
![Page 73: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/73.jpg)
Common
![Page 74: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/74.jpg)
Common
![Page 75: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/75.jpg)
Common
![Page 76: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/76.jpg)
File > Save As
![Page 77: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/77.jpg)
File > Export Results
![Page 78: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/78.jpg)
2.2 Bayesian ANOVA
![Page 79: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/79.jpg)
Common > ANOVA > Bayesian ANOVA
![Page 80: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/80.jpg)
Common > ANOVA > Bayesian ANOVA
![Page 81: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/81.jpg)
Common > ANOVA > Bayesian ANOVA
![Page 82: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/82.jpg)
2.3 Bayesian t-test
![Page 83: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/83.jpg)
tutedata2.csv
Planned analysis #1: Null effect under category sampling?
![Page 84: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/84.jpg)
Common > T-Test > Bayesian Independent Samples T-Test
![Page 85: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/85.jpg)
Common > T-Test > Bayesian Independent Samples T-Test
![Page 86: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/86.jpg)
tutedata2.csv
Planned analysis #2: large < small under property sampling
![Page 87: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/87.jpg)
Common > T-Test > Bayesian Independent Samples T-Test
![Page 88: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/88.jpg)
Common > T-Test > Bayesian Independent Samples T-Test
![Page 89: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/89.jpg)
2.4 Bayesian regression
![Page 90: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/90.jpg)
tutedata5.csv
![Page 91: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/91.jpg)
Common > Regression > Bayesian Linear Regression
![Page 92: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/92.jpg)
Common > Regression > Bayesian Linear Regression
![Page 93: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/93.jpg)
Common > Regression > Bayesian Linear Regression
![Page 94: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/94.jpg)
2.5 Bayesian contingency tables
![Page 95: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/95.jpg)
tutedata5.csv
![Page 96: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/96.jpg)
Common > Frequencies > Bayesian Contingency Tables
![Page 97: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/97.jpg)
Common > Frequencies > Bayesian Contingency Tables
![Page 98: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/98.jpg)
Common > Frequencies > Bayesian Contingency Tables
![Page 99: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/99.jpg)
2.6 Bayesian binomial test
![Page 100: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/100.jpg)
![Page 101: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/101.jpg)
Common > Frequencies > Bayesian Binomial Test
![Page 102: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/102.jpg)
![Page 103: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/103.jpg)
Alternative
⇥
⇥
=
=
Prior LikelihoodBayes factor
Null
Wait… we got 1.87 for this Bayes factor and JASP says 2.07
![Page 104: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/104.jpg)
Alternative
⇥
⇥
=
=
Prior LikelihoodBayes factor
Null
It’s just an approximation error… if we use finer-grained approximation to “continuous numbers” we get 2.05
![Page 105: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/105.jpg)
2.7 Beyond basics
… to be added at a later stage!
JASP Stan … R
![Page 106: Bayesian data analysis using JASPA scientific theory is nota repeatable procedure, and cannot be assigned a probability: there is no such ... run a frequentist ANOVA Common > ANOVA](https://reader030.vdocument.in/reader030/viewer/2022040818/5e62e2ca5496b40050733d28/html5/thumbnails/106.jpg)
Done!