Skip to content

Commit

Permalink
Reduce level of indentation for all examples/ nbs
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanistheone committed Feb 2, 2024
1 parent 853f949 commit 85c28da
Show file tree
Hide file tree
Showing 6 changed files with 96 additions and 96 deletions.
14 changes: 7 additions & 7 deletions examples/ANOVA.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "5b41ceb6-d385-4837-b5e0-5e21e643d6e6",
"metadata": {},
"source": [
"### Analysis of variance (ANOVA)"
"# Analysis of variance (ANOVA)"
]
},
{
Expand Down Expand Up @@ -53,15 +53,15 @@
"id": "e41da4dc-40bc-4074-b3ca-5f2a2534fdcf",
"metadata": {},
"source": [
"#### Definitions"
"## Definitions"
]
},
{
"cell_type": "markdown",
"id": "442020c3-458a-469b-a82e-c7f3beafb812",
"metadata": {},
"source": [
"#### Formulas"
"## Formulas"
]
},
{
Expand All @@ -79,31 +79,31 @@
"id": "60311b0a-7c91-4df0-be4a-accc69028d8c",
"metadata": {},
"source": [
"#### Example"
"## Example"
]
},
{
"cell_type": "markdown",
"id": "2edd0ff1-e544-41a3-845a-c0471e345d41",
"metadata": {},
"source": [
"#### Explanations"
"## Explanations"
]
},
{
"cell_type": "markdown",
"id": "bf5f1bcf-d993-47e8-9f1b-52902c63c9e3",
"metadata": {},
"source": [
"#### Discussion"
"## Discussion"
]
},
{
"cell_type": "markdown",
"id": "c6bfa142-4e3f-46a0-bbd9-212692dd1b3d",
"metadata": {},
"source": [
"#### Equivalence between ANOVA and OLS\n",
"## Equivalence between ANOVA and OLS\n",
"\n",
"via https://stats.stackexchange.com/questions/175246/why-is-anova-equivalent-to-linear-regression"
]
Expand Down
32 changes: 16 additions & 16 deletions examples/Mann-Whitney_U-test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "229b9ce5-9ba8-406a-bb1a-5979d1e2a64f",
"metadata": {},
"source": [
"### Mann-Whitney U-test\n",
"# Mann-Whitney U-test\n",
"\n",
"The goal of the Mann-Whitney $U$-test to compare the medians two unknown population.\n",
"\n",
Expand Down Expand Up @@ -61,7 +61,7 @@
"id": "09804789-d86e-4df9-a3d9-4106bfbf76d1",
"metadata": {},
"source": [
"#### Data\n",
"## Data\n",
"Two samples of numerical or ordinal observations $\\mathbf{x}=[x_1, x_2, \\ldots, x_n]$\n",
"and $\\mathbf{y}=[y_1, y_2,\\ldots, y_m]$ from independent populations."
]
Expand All @@ -71,7 +71,7 @@
"id": "d69a9922-b2a7-44f3-83f1-ed3713d71e8f",
"metadata": {},
"source": [
"#### Modeling assumptions\n",
"## Modeling assumptions\n",
"\n",
"We don't need to make any assumptions about the unknown populations."
]
Expand All @@ -81,7 +81,7 @@
"id": "b69c7ac0-31bd-479e-afb4-f9505bfca4ef",
"metadata": {},
"source": [
"#### Hypotheses\n",
"## Hypotheses\n",
"\n",
"We're testing $H_0: \\med_X = \\med_Y$ against $H_A: \\med_X \\neq \\med_Y$."
]
Expand All @@ -91,7 +91,7 @@
"id": "146b20c4-d535-46fe-86cc-8c2c52bfa39f",
"metadata": {},
"source": [
"#### Statistical design\n",
"## Statistical design\n",
"\n",
"???"
]
Expand All @@ -109,7 +109,7 @@
"id": "7674af35-fd9d-4608-970a-b74c27ca3475",
"metadata": {},
"source": [
"#### Test statistic\n",
"## Test statistic\n",
"\n",
"Compute expressions $U_1 = \\sum_{i=1}^n \\Rank(x_i) - \\frac{n(n+1)}{2}$\n",
"and $U_2 = \\sum_{i=1}^m \\Rank(y_i) - \\frac{m(m+1)}{2}$,\n",
Expand All @@ -122,7 +122,7 @@
"id": "46a6143a-ca4b-4568-bf5a-862a577c8c21",
"metadata": {},
"source": [
"#### Sampling distribution\n",
"## Sampling distribution\n",
"\n",
"For small sample sizes,\n",
"the exact sampling distribution is obtained through a computational procedure.\n",
Expand All @@ -135,7 +135,7 @@
"id": "15cf13c7-78bf-495a-baf8-2312c6210c2a",
"metadata": {},
"source": [
"#### P-value calculation"
"## P-value calculation"
]
},
{
Expand Down Expand Up @@ -164,15 +164,15 @@
"id": "1d4c8b3d-5028-47ae-935e-7fda0667b710",
"metadata": {},
"source": [
"#### Examples"
"## Examples"
]
},
{
"cell_type": "markdown",
"id": "3b991eb0-8635-4e6f-9340-6c5ae3e1cb9c",
"metadata": {},
"source": [
"##### Example 1\n",
"### Example 1\n",
"\n",
"The dataset `outliers2.csv` consists of measurements of soil score variable\n",
"using a specialized equipment for calculating soil quality.\n",
Expand Down Expand Up @@ -344,7 +344,7 @@
"id": "3c8c7fbb-a5d2-449c-b49d-69d470b51024",
"metadata": {},
"source": [
"###### Using a regular two-sample t-test"
"#### Using a regular two-sample t-test"
]
},
{
Expand Down Expand Up @@ -391,7 +391,7 @@
"id": "5c7b1504-f4a7-4aa1-a19e-c3b92055d06a",
"metadata": {},
"source": [
"###### Using the Mann-Whitney U-test"
"#### Using the Mann-Whitney U-test"
]
},
{
Expand Down Expand Up @@ -449,7 +449,7 @@
"id": "9ae28def-30d0-4b39-8365-e06ed7cf9081",
"metadata": {},
"source": [
"#### Confidence interval for the effect size"
"## Confidence interval for the effect size"
]
},
{
Expand All @@ -465,7 +465,7 @@
"id": "6be145e5-8cee-4d19-b215-807f690af3aa",
"metadata": {},
"source": [
"#### Related\n",
"## Related\n",
"\n"
]
},
Expand All @@ -482,7 +482,7 @@
"id": "aff7ca4d-e061-40ad-9a6f-0c48913a001f",
"metadata": {},
"source": [
"#### Discussion"
"## Discussion"
]
},
{
Expand All @@ -498,7 +498,7 @@
"id": "fa1f1c61-0742-4945-9618-8ec17f6263d7",
"metadata": {},
"source": [
"#### Links"
"## Links"
]
},
{
Expand Down
34 changes: 17 additions & 17 deletions examples/one_sample_t-test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "229b9ce5-9ba8-406a-bb1a-5979d1e2a64f",
"metadata": {},
"source": [
"### One-sample t-test for the mean\n",
"# One-sample t-test for the mean\n",
"\n",
"The goal of the one-sample $t$-test to check if the mean $\\mu$ of an unknown population $X \\sim \\mathcal{N}(\\mu, \\sigma_0)$,\n",
"equals the mean $\\mu_0$ of a theoretical distribution $X_0 \\sim \\mathcal{N}(\\mu_0, \\sigma_0)$.\n",
Expand Down Expand Up @@ -58,7 +58,7 @@
"id": "09804789-d86e-4df9-a3d9-4106bfbf76d1",
"metadata": {},
"source": [
"#### Data\n",
"## Data\n",
"One sample of numerical observations $\\mathbf{x}=[x_1, x_2, \\ldots, x_n]$."
]
},
Expand All @@ -67,7 +67,7 @@
"id": "d69a9922-b2a7-44f3-83f1-ed3713d71e8f",
"metadata": {},
"source": [
"#### Modeling assumptions\n",
"## Modeling assumptions\n",
"\n",
"We model the unknown population as...\n",
"\n",
Expand All @@ -88,7 +88,7 @@
"id": "b69c7ac0-31bd-479e-afb4-f9505bfca4ef",
"metadata": {},
"source": [
"#### Hypotheses\n",
"## Hypotheses\n",
"\n",
"$H_0: \\mu = \\mu_0$ and $H_A: \\mu \\neq \\mu_0$,\n",
"where $\\mu$ is the unknown population mean,\n",
Expand All @@ -100,7 +100,7 @@
"id": "146b20c4-d535-46fe-86cc-8c2c52bfa39f",
"metadata": {},
"source": [
"#### Statistical design\n",
"## Statistical design\n",
"\n",
"for $n=5$ ...\n",
"\n",
Expand All @@ -121,7 +121,7 @@
"id": "7674af35-fd9d-4608-970a-b74c27ca3475",
"metadata": {},
"source": [
"#### Estimates\n",
"## Estimates\n",
"\n",
"Calculate the sample mean $\\overline{\\mathbf{x}} = \\Mean(\\mathbf{x})$\n",
"and the sample standard deviation $s_{\\mathbf{x}} = \\Std(\\mathbf{x})$.\n",
Expand All @@ -134,7 +134,7 @@
"id": "ab880b56-b783-4c32-b2cd-8cb66b59f766",
"metadata": {},
"source": [
"#### Test statistic\n",
"## Test statistic\n",
"\n",
"Compute $t = \\frac{\\overline{\\mathbf{x}} - \\mu_0}{ \\stderrhat{\\overline{\\mathbf{x}}} }$ from\n",
"the sample mean $\\overline{\\mathbf{x}}$,\n",
Expand All @@ -147,7 +147,7 @@
"id": "46a6143a-ca4b-4568-bf5a-862a577c8c21",
"metadata": {},
"source": [
"#### Sampling distribution\n",
"## Sampling distribution\n",
"\n",
"Student's $t$-distribution with $\\nu=n-1$ degrees of freedom."
]
Expand All @@ -157,7 +157,7 @@
"id": "15cf13c7-78bf-495a-baf8-2312c6210c2a",
"metadata": {},
"source": [
"#### P-value calculation"
"## P-value calculation"
]
},
{
Expand Down Expand Up @@ -217,7 +217,7 @@
"id": "c46e51cc-143b-4e0c-8872-c17a54e7810d",
"metadata": {},
"source": [
"#### Examples\n",
"## Examples\n",
"\n",
"For all the examples we present below,\n",
"we assume the theoretical distribution we expect under the null hypothesis,\n",
Expand Down Expand Up @@ -256,7 +256,7 @@
"id": "f65e1b6e-01a6-44fd-b112-455ec9cb0226",
"metadata": {},
"source": [
"##### Example A: population different from $H_0$"
"### Example A: population different from $H_0$"
]
},
{
Expand Down Expand Up @@ -445,7 +445,7 @@
"id": "aa3a24ed-d585-4b3c-b5c0-f6ab6446819c",
"metadata": {},
"source": [
"##### Example B: sample from a population as expected under $H_0$"
"### Example B: sample from a population as expected under $H_0$"
]
},
{
Expand Down Expand Up @@ -588,7 +588,7 @@
"id": "9ae28def-30d0-4b39-8365-e06ed7cf9081",
"metadata": {},
"source": [
"#### Confidence interval for the unknown mean"
"## Confidence interval for the unknown mean"
]
},
{
Expand Down Expand Up @@ -656,15 +656,15 @@
"id": "9b660562-54a5-4c6c-b54e-fc128e541a56",
"metadata": {},
"source": [
"#### Effect size estimates"
"## Effect size estimates"
]
},
{
"cell_type": "markdown",
"id": "6be145e5-8cee-4d19-b215-807f690af3aa",
"metadata": {},
"source": [
"#### Related\n",
"## Related\n",
"\n",
"- Use the one-sample $z$-test if the population standard deviation is known"
]
Expand All @@ -682,7 +682,7 @@
"id": "aff7ca4d-e061-40ad-9a6f-0c48913a001f",
"metadata": {},
"source": [
"#### Discussion"
"## Discussion"
]
},
{
Expand All @@ -698,7 +698,7 @@
"id": "fa1f1c61-0742-4945-9618-8ec17f6263d7",
"metadata": {},
"source": [
"#### Links"
"## Links"
]
},
{
Expand Down
Loading

0 comments on commit 85c28da

Please sign in to comment.