Skip to content

Commit

Permalink
markdown source builds
Browse files Browse the repository at this point in the history
Auto-generated via `{sandpaper}`
Source  : d7ec13d
Branch  : main
Author  : Christian Knudsen <[email protected]>
Time    : 2024-11-08 09:39:40 +0000
Message : Merge pull request KUBDatalab#167 from chrbknudsen/main

flere mindre rettelser
  • Loading branch information
actions-user committed Nov 8, 2024
1 parent ea1d4ce commit 34bdd46
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 59 deletions.
4 changes: 2 additions & 2 deletions clt.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ mean(random_numbers)
```

``` output
[1] 0.5107301
[1] 0.4834503
```
The important point of the Central Limit Theorem is, that if we take a large
number of random samples, and calculate the mean of each of these samples,
Expand All @@ -59,7 +59,7 @@ mean(runif(100))
```

``` output
[1] 0.4658433
[1] 0.4370272
```
And we can use the `replicate()` function to repeat that calculation several times, in this case 1000 times:

Expand Down
9 changes: 7 additions & 2 deletions descript-stat.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,18 +339,23 @@ by the variance as defined here, and we would really like to get a
connection between what we observe here, and the normal distribution.
:::

The mathematical notation would be:
For the population variance, the mathematical notation would be:

$$
\sigma^2 = \frac{\sum_{i=1}^N(x_i - \mu)^2}{N}
$$

:::: callout

## Population or sample?

Why are we suddenly using $\mu$ instead of $\overline{x}$? Because this
definition uses the population mean. The mean, or average, in the entire
population of all penguins everywhere in the universe. But we have not
weighed all those penguins.
::::

Instead we will normally look at the sample variance:
And the sample variance:

$$
s^2 = \frac{\sum_{i=1}^N(x_i - \overline{x})^2}{N-1}
Expand Down
Binary file modified fig/clt-rendered-random-histogram-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fig/clt-rendered-repeated-means-histogram-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 19 additions & 19 deletions kmeans.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,31 +144,31 @@ clustering
```

``` output
K-means clustering with 3 clusters of sizes 62, 47, 69
K-means clustering with 3 clusters of sizes 47, 69, 62
Cluster means:
Alcohol Malicacid Ash Alcalinityofash Magnesium Totalphenols Flavanoids
1 12.92984 2.504032 2.408065 19.89032 103.59677 2.111129 1.584032
2 13.80447 1.883404 2.426170 17.02340 105.51064 2.867234 3.014255
3 12.51667 2.494203 2.288551 20.82319 92.34783 2.070725 1.758406
1 13.80447 1.883404 2.426170 17.02340 105.51064 2.867234 3.014255
2 12.51667 2.494203 2.288551 20.82319 92.34783 2.070725 1.758406
3 12.92984 2.504032 2.408065 19.89032 103.59677 2.111129 1.584032
Nonflavanoidphenols Proanthocyanins Colorintensity Hue
1 0.3883871 1.503387 5.650323 0.8839677
2 0.2853191 1.910426 5.702553 1.0782979
3 0.3901449 1.451884 4.086957 0.9411594
1 0.2853191 1.910426 5.702553 1.0782979
2 0.3901449 1.451884 4.086957 0.9411594
3 0.3883871 1.503387 5.650323 0.8839677
OD280OD315ofdilutedwines Proline
1 2.365484 728.3387
2 3.114043 1195.1489
3 2.490725 458.2319
1 3.114043 1195.1489
2 2.490725 458.2319
3 2.365484 728.3387
Clustering vector:
[1] 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 2 2 1 1 2 2 1 2 2 2 2 2 2 1 1
[38] 2 2 1 1 2 2 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 1 3 1 3 3 1 3 3 1 1 1 3 3 2
[75] 1 3 3 3 1 3 3 1 1 3 3 3 3 3 1 1 3 3 3 3 3 1 1 3 1 3 1 3 3 3 1 3 3 3 3 1 3
[112] 3 1 3 3 3 3 3 3 3 1 3 3 3 3 3 3 3 3 3 1 3 3 1 1 1 1 3 3 3 1 1 3 3 1 1 3 1
[149] 1 3 3 3 3 1 1 1 3 1 1 1 3 1 3 1 1 3 1 1 1 1 3 3 1 1 1 1 1 3
[1] 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 3 1 1 3 3 1 1 3 1 1 1 1 1 1 3 3
[38] 1 1 3 3 1 1 3 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 3 2 3 2 2 3 2 2 3 3 3 2 2 1
[75] 3 2 2 2 3 2 2 3 3 2 2 2 2 2 3 3 2 2 2 2 2 3 3 2 3 2 3 2 2 2 3 2 2 2 2 3 2
[112] 2 3 2 2 2 2 2 2 2 3 2 2 2 2 2 2 2 2 2 3 2 2 3 3 3 3 2 2 2 3 3 2 2 3 3 2 3
[149] 3 2 2 2 2 3 3 3 2 3 3 3 2 3 2 3 3 2 3 3 3 3 2 2 3 3 3 3 3 2
Within cluster sum of squares by cluster:
[1] 566572.5 1360950.5 443166.7
[1] 1360950.5 443166.7 566572.5
(between_SS / total_SS = 86.5 %)
Available components:
Expand All @@ -188,9 +188,9 @@ table()
``` output
true
quess 1 2 3
1 13 20 29
2 46 1 0
3 0 50 19
1 46 1 0
2 0 50 19
3 13 20 29
```

The algorithm have no idea about the numbering, the three groups are numbered
Expand Down
70 changes: 35 additions & 35 deletions md5sum.txt
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
"file" "checksum" "built" "date"
"CODE_OF_CONDUCT.md" "c93c83c630db2fe2462240bf72552548" "site/built/CODE_OF_CONDUCT.md" "2024-11-07"
"LICENSE.md" "b24ebbb41b14ca25cf6b8216dda83e5f" "site/built/LICENSE.md" "2024-11-07"
"config.yaml" "76188894d250a68fbdf65206cee2d873" "site/built/config.yaml" "2024-11-07"
"index.md" "e4e80431f54f0c27189828975817535f" "site/built/index.md" "2024-11-07"
"links.md" "8184cf4149eafbf03ce8da8ff0778c14" "site/built/links.md" "2024-11-07"
"episodes/reproducible-analysis.Rmd" "c35d8069a53be38e0fc226243af7fc12" "site/built/reproducible-analysis.md" "2024-11-07"
"episodes/reading-files.Rmd" "6801a342ac80a18f14940e2ff2d7178e" "site/built/reading-files.md" "2024-11-07"
"episodes/descript-stat.Rmd" "e6ed7be2c8b84880a03617e4ae29f3b1" "site/built/descript-stat.md" "2024-11-07"
"episodes/table1.Rmd" "1615b0b67bb2e6a3d9a992a00d3edde3" "site/built/table1.md" "2024-11-07"
"episodes/tidy-data.Rmd" "32109e710bb7b47451b8783b246aa857" "site/built/tidy-data.md" "2024-11-07"
"episodes/normal-distribution.Rmd" "9fa78964d1ae9ad23dc093a58032603d" "site/built/normal-distribution.md" "2024-11-07"
"episodes/is-it-normal.Rmd" "11a13d7d94514cf399cdb8cf13434644" "site/built/is-it-normal.md" "2024-11-07"
"episodes/which-distribution.Rmd" "278d093f8a9183c0af804bb1a5d8d380" "site/built/which-distribution.md" "2024-11-07"
"episodes/linear-regression.Rmd" "a8c98e6aff61f5ac9d84cc8430482755" "site/built/linear-regression.md" "2024-11-07"
"episodes/multiple-linear-regression.Rmd" "824e184fc6e7b34e5da48ccdccd71a33" "site/built/multiple-linear-regression.md" "2024-11-07"
"episodes/logistic-regression.Rmd" "c30866b932a9aaae8ffc4d7c5b4e7c44" "site/built/logistic-regression.md" "2024-11-07"
"episodes/clt.Rmd" "3a95f0bc7a29f3292c4e1384769136c6" "site/built/clt.md" "2024-11-07"
"episodes/barcharts.Rmd" "d13860878ad4c21d2e5f62712340b5f9" "site/built/barcharts.md" "2024-11-07"
"episodes/powerberegninger.Rmd" "95cca947578947793867ed6420ad9c11" "site/built/powerberegninger.md" "2024-11-07"
"episodes/kmeans.Rmd" "4d50bf44423a43c6771e49b4d7644272" "site/built/kmeans.md" "2024-11-07"
"episodes/factor-analysis.Rmd" "3bfd44b44f7264e4512b16596a47807d" "site/built/factor-analysis.md" "2024-11-07"
"episodes/structure-you-work.Rmd" "e4840023cedfc41b1419e8f0393e2919" "site/built/structure-you-work.md" "2024-11-07"
"episodes/fence-test.Rmd" "c329445266c4cfd778728f6f5eafd613" "site/built/fence-test.md" "2024-11-07"
"episodes/design-principles.Rmd" "be6a1101577ab5464d8ed8c6ed698ea1" "site/built/design-principles.md" "2024-11-07"
"episodes/large-data.Rmd" "c23e056693250bbde7f18c4df53fa092" "site/built/large-data.md" "2024-11-07"
"episodes/making-a-new-course.Rmd" "4d18ede2bc30c514663dbcd29e07f28e" "site/built/making-a-new-course.md" "2024-11-07"
"instructors/instructor-notes.md" "5cf113fd22defb29d17b64597f3c9bc0" "site/built/instructor-notes.md" "2024-11-07"
"learners/CLT-dk.md" "a1852fcb44235823d23cd4a4af6d3d49" "site/built/CLT-dk.md" "2024-11-07"
"learners/CLT-en.md" "8ae8f14f05472820ef155acf980ae06f" "site/built/CLT-en.md" "2024-11-07"
"learners/data.md" "629a1935166e040d5aa8832446946310" "site/built/data.md" "2024-11-07"
"learners/reference.md" "527a12e217602daae51c5fd9ef8958df" "site/built/reference.md" "2024-11-07"
"learners/setup.md" "0c80507a6a78380e67338e8e60563b20" "site/built/setup.md" "2024-11-07"
"poster/poster_dk.Rmd" "721a2b68eeb0b61308158bce41c6ae21" "site/built/poster_dk.md" "2024-11-07"
"profiles/learner-profiles.md" "5fe5bf7537072422b91ed393ada03f9a" "site/built/learner-profiles.md" "2024-11-07"
"renv/profiles/lesson-requirements/renv.lock" "9ed26f276abd55a38c1794db92e9e4c2" "site/built/renv.lock" "2024-11-07"
"CODE_OF_CONDUCT.md" "c93c83c630db2fe2462240bf72552548" "site/built/CODE_OF_CONDUCT.md" "2024-11-08"
"LICENSE.md" "b24ebbb41b14ca25cf6b8216dda83e5f" "site/built/LICENSE.md" "2024-11-08"
"config.yaml" "76188894d250a68fbdf65206cee2d873" "site/built/config.yaml" "2024-11-08"
"index.md" "e4e80431f54f0c27189828975817535f" "site/built/index.md" "2024-11-08"
"links.md" "8184cf4149eafbf03ce8da8ff0778c14" "site/built/links.md" "2024-11-08"
"episodes/reproducible-analysis.Rmd" "c35d8069a53be38e0fc226243af7fc12" "site/built/reproducible-analysis.md" "2024-11-08"
"episodes/reading-files.Rmd" "6801a342ac80a18f14940e2ff2d7178e" "site/built/reading-files.md" "2024-11-08"
"episodes/descript-stat.Rmd" "3ba080e25de490610850624270699758" "site/built/descript-stat.md" "2024-11-08"
"episodes/table1.Rmd" "1615b0b67bb2e6a3d9a992a00d3edde3" "site/built/table1.md" "2024-11-08"
"episodes/tidy-data.Rmd" "32109e710bb7b47451b8783b246aa857" "site/built/tidy-data.md" "2024-11-08"
"episodes/normal-distribution.Rmd" "9fa78964d1ae9ad23dc093a58032603d" "site/built/normal-distribution.md" "2024-11-08"
"episodes/is-it-normal.Rmd" "11a13d7d94514cf399cdb8cf13434644" "site/built/is-it-normal.md" "2024-11-08"
"episodes/which-distribution.Rmd" "278d093f8a9183c0af804bb1a5d8d380" "site/built/which-distribution.md" "2024-11-08"
"episodes/linear-regression.Rmd" "a8c98e6aff61f5ac9d84cc8430482755" "site/built/linear-regression.md" "2024-11-08"
"episodes/multiple-linear-regression.Rmd" "824e184fc6e7b34e5da48ccdccd71a33" "site/built/multiple-linear-regression.md" "2024-11-08"
"episodes/logistic-regression.Rmd" "c30866b932a9aaae8ffc4d7c5b4e7c44" "site/built/logistic-regression.md" "2024-11-08"
"episodes/clt.Rmd" "3a95f0bc7a29f3292c4e1384769136c6" "site/built/clt.md" "2024-11-08"
"episodes/barcharts.Rmd" "d13860878ad4c21d2e5f62712340b5f9" "site/built/barcharts.md" "2024-11-08"
"episodes/powerberegninger.Rmd" "95cca947578947793867ed6420ad9c11" "site/built/powerberegninger.md" "2024-11-08"
"episodes/kmeans.Rmd" "4d50bf44423a43c6771e49b4d7644272" "site/built/kmeans.md" "2024-11-08"
"episodes/factor-analysis.Rmd" "3bfd44b44f7264e4512b16596a47807d" "site/built/factor-analysis.md" "2024-11-08"
"episodes/structure-you-work.Rmd" "e4840023cedfc41b1419e8f0393e2919" "site/built/structure-you-work.md" "2024-11-08"
"episodes/fence-test.Rmd" "c329445266c4cfd778728f6f5eafd613" "site/built/fence-test.md" "2024-11-08"
"episodes/design-principles.Rmd" "be6a1101577ab5464d8ed8c6ed698ea1" "site/built/design-principles.md" "2024-11-08"
"episodes/large-data.Rmd" "c23e056693250bbde7f18c4df53fa092" "site/built/large-data.md" "2024-11-08"
"episodes/making-a-new-course.Rmd" "4d18ede2bc30c514663dbcd29e07f28e" "site/built/making-a-new-course.md" "2024-11-08"
"instructors/instructor-notes.md" "5cf113fd22defb29d17b64597f3c9bc0" "site/built/instructor-notes.md" "2024-11-08"
"learners/CLT-dk.md" "a1852fcb44235823d23cd4a4af6d3d49" "site/built/CLT-dk.md" "2024-11-08"
"learners/CLT-en.md" "8ae8f14f05472820ef155acf980ae06f" "site/built/CLT-en.md" "2024-11-08"
"learners/data.md" "629a1935166e040d5aa8832446946310" "site/built/data.md" "2024-11-08"
"learners/reference.md" "527a12e217602daae51c5fd9ef8958df" "site/built/reference.md" "2024-11-08"
"learners/setup.md" "0c80507a6a78380e67338e8e60563b20" "site/built/setup.md" "2024-11-08"
"poster/poster_dk.Rmd" "721a2b68eeb0b61308158bce41c6ae21" "site/built/poster_dk.md" "2024-11-08"
"profiles/learner-profiles.md" "5fe5bf7537072422b91ed393ada03f9a" "site/built/learner-profiles.md" "2024-11-08"
"renv/profiles/lesson-requirements/renv.lock" "e71cece1427e4122831adf6277d5ee33" "site/built/renv.lock" "2024-11-08"
2 changes: 1 addition & 1 deletion normal-distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ rnorm(5, mean = 0, sd = 1 )
```

``` output
[1] -0.5012600 0.6792018 0.9950838 -1.4185692 -0.4106442
[1] -0.06628293 -0.94233783 1.54180816 1.33387672 1.14548414
```
Den returnerer (her) fem tilfældige værdier fra en normalfordeling med (her)
middelværdi 0 og standardafvigelse 1.
Expand Down

0 comments on commit 34bdd46

Please sign in to comment.