| π Banana |
π¬ Candy |
|---|---|
| 9 | 3 |
| 11 | 5 |
| 13 | 4 |
| \(M = 11\) | \(M = 4\) |
Manipulation
|
|
|---|---|
| π Banana |
π¬ Candy |
| 9 | 3 |
| 11 | 5 |
| 13 | 4 |
| \(M = 11\) | \(M = 4\) |
\(t = \dfrac{ \textrm{difference between groups}} {\textrm{difference expected due to chance}}\)
\[\begin{align} t &= \dfrac{(M_1-M_2)-(\mu_1-\mu_2)}{s_{(M_1-M_2)}} \\ &= \dfrac{11 - 4}{1.29} \\ &= 5.42 \end{align}\]
Manipulation
|
|
|---|---|
| π Banana |
π¬ Candy |
| 9 | 3 |
| 11 | 5 |
| 13 | 4 |
| \(M = 11\) | \(M = 4\) |
\(t = 5.42\)
\(t = \dfrac{\text{difference between groups}}{\text{difference expected due to chance}}\)
is analogous toβ¦
\(\dfrac{treatment \cdot chance}{chance}\)
Manipulation
|
|
|---|---|
| π Banana |
π¬ Candy |
| 9 | 3 |
| 11 | 5 |
| 13 | 4 |
| \(M = 11\) | \(M = 4\) |
\(t = 5.42\)
Total
variability in data
Variability
between groups
Variability
within groups
\(\dfrac{\text{variability between groups}}{\text{variability within groups}}\)
is analogous toβ¦
\(\dfrac{treatment \cdot chance}{chance}\)
Manipulation
|
|
|---|---|
| π Banana |
π¬ Candy |
| 9 | 3 |
| 11 | 5 |
| 13 | 4 |
| \(M = 11\) | \(M = 4\) |
\(t = 5.42\)
\[\begin{align} \text{Variance}_{total} &= \dfrac{SS_{total}}{df_{total}} \\ &= \dfrac{83.5}{5} \\ &= 16.7 \end{align}\]
Manipulation
|
|
|---|---|
| π Banana |
π¬ Candy |
| 9 | 3 |
| 11 | 5 |
| 13 | 4 |
| \(M = 11\) | \(M = 4\) |
\(t = 5.42\)
\(\text{Variance}_{total} = 16.7\)
\[\begin{align} \text{Variance}_{within} &= \dfrac{SS_{within}}{df_{within}} \\ &= \dfrac{8 + 2}{2 + 2} \\ &= 2.5 \end{align}\]
Manipulation
|
|
|---|---|
| π Banana |
π¬ Candy |
| 9 | 3 |
| 11 | 5 |
| 13 | 4 |
| \(M = 11\) | \(M = 4\) |
\(t = 5.42\)
\(\text{Variance}_{total} = 16.7\)
\(\text{Variance}_{within} = 2.5\)
\(SS_{between} = SS_{total} β SS_{within}\)
\(df_{between} = df_{total} β df_{within}\)
\[\begin{align} \text{Variance}_{between} &= \dfrac{SS_{between}}{df_{between}} \\ &= \dfrac{83.5 - 10}{5-4} \\ &= 73.5 \end{align}\]
Manipulation
|
|
|---|---|
| π Banana |
π¬ Candy |
| 9 | 3 |
| 11 | 5 |
| 13 | 4 |
| \(M = 11\) | \(M = 4\) |
\(t = 5.42\)
\(\text{Variance}_{total} = 16.7\)
\(\text{Variance}_{within} = 2.5\) \(\text{Variance}_{between} = 73.5\)
Total
variability in data
Variability
between groups
Variability
within groups
\(\dfrac{\text{variance between groups}}{\text{variance within groups}}\)
\(\dfrac{73.5}{2.5} = 29.4\)
Manipulation
|
|
|---|---|
| π Banana |
π¬ Candy |
| 9 | 3 |
| 11 | 5 |
| 13 | 4 |
| \(M = 11\) | \(M = 4\) |
\(t = 5.42\)
\(F = 29.4\)
Total
variability in data
Variability
between groups
Variability
within groups
\(\dfrac{\text{variance between groups}}{\text{variance within groups}}\)
is analogous toβ¦
\(\dfrac{treatment \cdot chance}{chance}\)
Manipulation
|
||
|---|---|---|
| π Banana |
π¬ Candy |
π Control |
| 9 | 3 | 5 |
| 11 | 5 | 6 |
| 13 | 4 | 7 |
| \(M = 11\) | \(M = 4\) | \(M = 6\) |
aov_pop = {
const w = 1050
const h = 250
const r = 70
const data = [0,1,2,3,4,5]
const svg = d3.select("#anova-populations")
.append("svg").attr("width", w).attr("height", h)
const comp_lines = svg.append("g")
.style("stroke", "red")
.style("fill", "none")
.style("stroke-dasharray", [5,5])
.style("stroke-width", 3)
const g = svg.append("g")
.attr("transform", "translate(10, 2)")
.style("fill", "var(--background-color)")
.style("stroke", "var(--text-color)")
const curve = d3.line().curve(d3.curveNatural);
const points = [[r, r],[r+r*1.25,r/2],[r+r*2.5, r]];
const labels = svg.append("g")
.attr("transform", "translate(10, 2)")
.style("fill", "var(--text-color)")
.style("stroke", "none")
.style("font-size", "0.7em")
.style("z-index", 100)
const pop = labels.append("g")
const samp = labels.append("g")
var visible = 5
function animate() {
if (visible==6) {
visible = 2
} else {
visible++
}
svg.selectAll("path").remove()
svg.selectAll("circle").remove()
svg.selectAll("rect").remove()
svg.selectAll("line").remove()
svg.selectAll("text").remove()
comp_lines.selectAll("path").data(data.slice(0,visible-1)).enter()
.append("path")
.attr("d", curve(points))
.attr("transform", d => `translate(${d * r * 2.5}, -20)`)
g.selectAll("circle").data(data.slice(0,visible)).enter()
.append("circle")
.attr("cx", d => r + d * r * 2.5)
.attr("cy", r)
.attr("r", r)
g.selectAll("rect").data(data.slice(0,visible)).enter()
.append("rect")
.attr("x", d => d * r * 2.5)
.attr("y", h - r - 4)
.attr("width", 2*r)
.attr("height", r)
g.selectAll("line").data(data.slice(0,visible)).enter()
.append("line")
.attr("x1", d => r + d * r * 2.5)
.attr("x2", d => r + d * r * 2.5)
.attr("y1", 2*r).attr("y2", h - r)
.style("stroke-dasharray", [5,5])
pop.selectAll("text").data(data.slice(0,visible)).enter()
.append("text")
.attr("x", d => r + d * r * 2.5)
.attr("y", r + 2)
.attr("text-anchor", "middle")
.attr("alignment-baseline", "middle")
.text("Population")
samp.selectAll("text").data(data.slice(0,visible)).enter()
.append("text")
.attr("x", d => r + d * r * 2.5)
.attr("y", h - r/2 - 2)
.attr("text-anchor", "middle")
.attr("alignment-baseline", "middle")
.text("Sample")
}
animate()
svg.on("click", animate)
}