Publications by aardvarkfunnyxia

Exercise 3

23.01.2024

Exercise 3.1. Create a new program to study this data. Download the dataset and save it with a short meaningful name. Are there any issues with the data which we need to take into account? plot the data in a similar style to Figure 3.1 but don’t worry about the flags or the statistics in the upper left hand corner. What sort of relationship does...

4848 sym R (2518 sym/23 pcs) 14 img

Exercise 3.5 Presentation

23.01.2024

2024-01-23 Exercise 3.5. For the country data: produce a matrix of scatter plots comparing the three numerical columns of data. You could either use: the pairs() function or explore the car package for a more sophisticated representation. Are any of the relationships linear? Look for best linear relationships using log() transformations and c...

743 sym 6 img

Exercise 3.5 Presentation

22.01.2024

2024-01-22 Exercise 3.5. For the country data: produce a matrix of scatter plots comparing the three numerical columns of data. You could either use: the pairs() function or explore the car package for a more sophisticated representation. Are any of the relationships linear? Look for best linear relationships using log() transformations and c...

729 sym 5 img

Exercise 3.3 presentation

21.01.2024

2024-01-21 Exercise 3.3 Apply your favorite transformation from Exercise 3.2 to the data, firstly excluding Brazil and China, and secondly excluding all dates before 2013. Produce a pair of plots similar to those in Exercise 3.2. What conclusions can we draw from our investigations? Does chocolate consumption improve intellectual output (for whic...

943 sym 4 img

Exercise 3.5 presentation

21.01.2024

2024-01-21 Exercise 3.5. For the country data: produce a matrix of scatter plots comparing the three numerical columns of data. You could either use: the pairs() function or explore the car package for a more sophisticated representation. Are any of the relationships linear? Look for best linear relationships using log() transformations and c...

659 sym 3 img

week 2

16.01.2024

(\(\blacksquare\) indicates the end of the answer of a specific exercise) First of all, let’s see the qanda data: ## Hair Birth Handspan Siblings Shoes Fish Height ## 1 Black July 20.0 1 10 1 168 ## 2 Blonde May 20.0 0 40 1 186 ## 3 Black October 15.8 1 37 0 183 ## 4 ...

4176 sym 2 img

Matrix multiplication

14.01.2024

There are two signs: \(*\) and %*% , both means multiplication in broad terms, but they are different when dealing with matrices. Suppose I have two vectors: A <- matrix (1:6, nrow = 2) B <- matrix (5:10, ncol = 2) View these matrices: ## [,1] [,2] [,3] ## [1,] 1 3 5 ## [2,] 2 4 6 ## [,1] [,2] ## [1,] 5 8 ## [2,] ...

719 sym

Extension - prop.table() and margin.table() in R

13.01.2024

How to use prop.table() in R The prop.table() in R can be used to calculate the value of each cell in a (contingency) table as a proportion of all values. The function uses the following basic syntax: prop.table( x, margin=NULL) where: x: Name of the Table margin: the margin to divide by (1 = row, 2 = column, default is NULL) Example: create a ma...

1999 sym

E1

11.01.2024

Exercise 1.1. euler’s constant n <- seq (from = 1, to = 100, by = 1) euler <- sum (n^(-1)) - log (100, base = exp (1)) euler ## [1] 0.5822073 Exercise 1.2. simple random walk set.seed (10) # set seed for reproduction steps <- rbinom (n = 999, size = 1, prob = 1/2) rademacher_variables <- c (0, 2 * steps - 1...

535 sym Python (2027 sym/18 pcs) 2 img

Exercise 1.6, plot on log scale of errors - Euler's constant

07.01.2024

Exercise 1.6. As in Exercise 1.1, compute \(\gamma \times n\) for \(n \in {10, 100, 1000, 10000, 100000}\). Compare your approximations \(\gamma \times n\) with the true value of the Euler’s constant (which you can obtain using -digamma(1) in R) to find the approximation error. Plot n against the approximation error with a log-log scale. prepara...

492 sym Python (1526 sym/15 pcs) 1 img