diff --git a/clt.md b/clt.md index 25412f28..084c70f1 100644 --- a/clt.md +++ b/clt.md @@ -45,7 +45,7 @@ mean(random_numbers) ``` ``` output -[1] 0.4799895 +[1] 0.5487439 ``` 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, @@ -59,7 +59,7 @@ mean(runif(100)) ``` ``` output -[1] 0.4575514 +[1] 0.4917325 ``` And we can use the `replicate()` function to repeat that calculation several times, in this case 1000 times: diff --git a/fig/clt-rendered-random-histogram-1.png b/fig/clt-rendered-random-histogram-1.png index 4676a55a..c976daa4 100644 Binary files a/fig/clt-rendered-random-histogram-1.png and b/fig/clt-rendered-random-histogram-1.png differ diff --git a/fig/clt-rendered-repeated-means-histogram-1.png b/fig/clt-rendered-repeated-means-histogram-1.png index c3c5c877..fb740271 100644 Binary files a/fig/clt-rendered-repeated-means-histogram-1.png and b/fig/clt-rendered-repeated-means-histogram-1.png differ diff --git a/kmeans.md b/kmeans.md index 5f8b5321..861a1e4d 100644 --- a/kmeans.md +++ b/kmeans.md @@ -144,32 +144,32 @@ clustering ``` ``` output -K-means clustering with 3 clusters of sizes 62, 47, 69 +K-means clustering with 3 clusters of sizes 50, 28, 100 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 - 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 - OD280OD315ofdilutedwines Proline -1 2.365484 728.3387 -2 3.114043 1195.1489 -3 2.490725 458.2319 + Alcohol Malicacid Ash Alcalinityofash Magnesium Totalphenols Flavanoids +1 13.33680 2.396800 2.3718 18.51000 108.6000 2.432400 2.214800 +2 13.82214 1.773929 2.4900 16.96429 105.3571 2.923929 3.111429 +3 12.60250 2.463600 2.3293 20.69600 93.7400 2.050400 1.633500 + Nonflavanoidphenols Proanthocyanins Colorintensity Hue +1 0.3236000 1.707200 5.143600 0.966720 +2 0.2985714 1.986786 6.202857 1.103571 +3 0.3987000 1.421900 4.694800 0.911900 + OD280OD315ofdilutedwines Proline +1 2.862800 894.60 +2 2.984643 1301.50 +3 2.381700 517.75 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 2 2 1 2 2 2 1 1 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 2 2 1 1 2 2 1 2 1 1 1 + [38] 2 1 1 1 1 1 3 1 1 1 1 1 2 2 2 2 2 1 2 1 2 2 3 3 3 3 3 3 3 3 3 1 1 1 3 3 1 + [75] 1 3 3 3 1 3 3 1 3 3 3 3 3 3 3 3 3 3 3 3 3 1 3 3 3 3 1 3 3 3 3 3 3 3 3 3 3 +[112] 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 1 3 3 3 3 1 3 3 1 1 3 3 +[149] 3 3 3 3 3 3 3 1 3 1 3 3 3 3 3 3 3 3 3 3 1 3 3 3 3 1 1 1 1 3 Within cluster sum of squares by cluster: -[1] 566572.5 1360950.5 443166.7 - (between_SS / total_SS = 86.5 %) +[1] 815783.7 550201.0 1263330.5 + (between_SS / total_SS = 85.1 %) Available components: @@ -188,9 +188,9 @@ table() ``` output true quess 1 2 3 - 1 13 20 29 - 2 46 1 0 - 3 0 50 19 + 1 30 9 11 + 2 28 0 0 + 3 1 62 37 ``` The algorithm have no idea about the numbering, the three groups are numbered diff --git a/md5sum.txt b/md5sum.txt index 531e6920..c54645eb 100644 --- a/md5sum.txt +++ b/md5sum.txt @@ -1,7 +1,7 @@ "file" "checksum" "built" "date" "CODE_OF_CONDUCT.md" "c93c83c630db2fe2462240bf72552548" "site/built/CODE_OF_CONDUCT.md" "2024-11-12" "LICENSE.md" "b24ebbb41b14ca25cf6b8216dda83e5f" "site/built/LICENSE.md" "2024-11-12" -"config.yaml" "ab3386f0cbf91528ac689e54989289c2" "site/built/config.yaml" "2024-11-12" +"config.yaml" "5514a53c965971f5454e4152c8760485" "site/built/config.yaml" "2024-11-12" "index.md" "61394b6d8242b2ec5c69d9c2493cd74b" "site/built/index.md" "2024-11-12" "links.md" "8184cf4149eafbf03ce8da8ff0778c14" "site/built/links.md" "2024-11-12" "episodes/reproducible-analysis.Rmd" "976433176d38ef5f97b18f2b25794941" "site/built/reproducible-analysis.md" "2024-11-12" diff --git a/normal-distribution.md b/normal-distribution.md index 6f77bce9..90ef2aec 100644 --- a/normal-distribution.md +++ b/normal-distribution.md @@ -196,7 +196,7 @@ rnorm(5, mean = 0, sd = 1 ) ``` ``` output -[1] -0.1404694 -0.2617336 0.2354110 -1.6658941 -2.2493942 +[1] -0.5854523 0.4889116 1.8896220 1.3496765 0.6922389 ``` Den returnerer (her) fem tilfældige værdier fra en normalfordeling med (her) middelværdi 0 og standardafvigelse 1.