Publications by Wiktoria Gnojek

Discussion Post 1 (605)

02.02.2022

Reading Question Page 171 Chapter M Perform the following matrix computation; ## creating the matrix m1.data <- c(2,4,7,-2,5,-3,8,-1,0,1,3,2) m1 <- matrix(m1.data,nrow=3,ncol=4) m1 m2.data <- c(2,3,1,7,-1,7,1,0,3,2,5,3) m2 <- matrix(m2.data,nrow=3,ncol=4) m2 ## m1 is multiplied by 6 and m2 is multiplied by (-2) m1.m <- 6*m1 m2.m <- (-2)*m2 prin...

773 sym R (605 sym/7 pcs)

Wgnojek_Assignment7_605

13.03.2022

Let X1, X2, . . . , Xn be n mutually independent random variables, each of which is uniformly distributed on the integers from 1 to k. Let Y denote the minimum of the Xi’s. Find the distribution of Y. k^n is the possible values P(Y-y) = 1 - (k-y/k)^n P(Y-y-1) = 1 - ((k-y+1)/k)^n Let’s say m is y; m(y) = ((k-y+1)^n - (k-y)n)/kn Source; https:...

1703 sym R (362 sym/24 pcs)

Data 605 Homework 6

07.03.2022

A bag contains 5 green and 7 red jellybeans. How many ways can 5 jellybeans be withdrawn from the bag so that the number of green ones withdrawn will be less than 2? choose(5,1) * choose(7,4) + choose(5,0) * choose(7,5) [1] 196 A certain congressional committee consists of 14 senators and 13 representatives. How many ways can a subcommittee of ...

8610 sym R (1073 sym/23 pcs)

WGnojek_Assignment3

14.02.2022

What is the rank of the matrix A? A <- matrix(c(1,-1,0,5,2,0,1,4,3,1,-2,-2,4,3,1,-3), nrow = 4, ncol = 4) A ## [,1] [,2] [,3] [,4] ## [1,] 1 2 3 4 ## [2,] -1 0 1 3 ## [3,] 0 1 -2 1 ## [4,] 5 4 -2 -3 Library Pracma library(pracma) rref(A) ## [,1] [,2] [,3] [,4] ## [1,] 1 0 0 0 ## [...

1049 sym R (1070 sym/22 pcs)

WGnojek_Assignment5

28.02.2022

(Bayesian). A new test for multinucleoside-resistant (MNR) human immunodeficiency virus type 1 (HIV-1) variants was recently developed. The test maintains 96% sensitivity, meaning that, for those with the disease, it will correctly report “positive” for 96% of them. The test is also 98% specific, meaning that, for those without the disease, 9...

6190 sym R (987 sym/52 pcs)

Week11_Discussion

07.04.2022

Regression Model The dataset I will be using can be found on Kaggle under; https://www.kaggle.com/datasets/mirichoi0218/insurance?resource=download For my regression model, I want to look at age and bmi as a factor that affects insurance charges. insurance <- read.csv("https://raw.githubusercontent.com/WiktoriaGnojek/Week-11-Regression/main/insur...

3475 sym R (1796 sym/11 pcs) 5 img

final_605

22.05.2022

Final Problem 1 Playing with PageRank You’ll verify for yourself that PageRank works by performing calculations on a small universe of web pages. Let’s use the 6 page universe that we had in the previous discussion. For this directed graph, perform the following calculations in R. Form the A matrix. r_1 <- c(0, 1/2, 1/2, 0, 0, 0) r_2 <-...

8342 sym R (17203 sym/93 pcs) 16 img

Homework15

16.05.2022

Find the equation of the regression line for the given points. Round any final values to the nearest hundredth, if necessary. ( 5.6, 8.8 ), ( 6.3, 12.4 ), ( 7, 14.8 ), ( 7.7, 18.2 ), ( 8.4, 20.8 ) X <- c(5.6,6.3,7,7.7,8.4) Y <- c(8.8, 12.4,14.8, 18.2,20.8) r <- lm(Y ~ X) r ## ## Call: ## lm(formula = Y ~ X) ## ## Coefficients: ## (Intercept) ...

2004 sym R (257 sym/4 pcs)

Homework_13_WG

02.05.2022

Use integration by substitution to solve the integral below. u = 7x , du = -7dx , dx = du/-7 4/-7 \(\int\) e^u du 4/-7e^u + C 4/-7e^-7x + C Biologists are treating a pond contaminated with bacteria. The level of contamination is changing at a rate of \(\displaystyle \frac{dN}{dt}\) = - \(\displaystyle \frac{3150}{t^4}\) - 220 bacteria per cubic...

1913 sym R (401 sym/9 pcs) 1 img

Homework12_605

16.04.2022

The attached who.csv dataset contains real-world data from 2008, the data set can be found under this link; https://github.com/WiktoriaGnojek/Week-12-data-605. Importing Data who <- read.csv("https://raw.githubusercontent.com/WiktoriaGnojek/Week-12-data-605/main/who.csv") Provide a scatterplot of LifeExp~TotExp, and run simple linear regression. ...

2191 sym R (2767 sym/11 pcs) 2 img