Statistical Analysis With R Math Skills Self-Assessment

Statistical Analysis with R Math Skills Self-Assessment

This self-assessment covers some basic topics that will appear during the Certificate in Statistical Analysis with R Programming. If you can't answer some of these questions, please brush up on these topics before the program begins using the resources listed at the end of this document, or other similar resources. If you have a difficult time answering the questions or completing them correctly, please consider accessing the resources we recommend and enrolling in the certificate once you’re able to complete the self-assessment successfully.

You do not need to submit your answers to UW Professional & Continuing Education. Still, we strongly urge you to check that you are comfortable with the level of math skills in these questions and understand that you are expected to understand and utilize these mathematics skills during the certificate.

Algebra

  1. What is the equation of the line in the x-y plane that goes through the points (0, 0) and (2, 2)?
  2. What is the slope of the line represented by y = 2x + 3?
  3. Where does the line represented by y = 2x + 3 intercepts the y-axis?
  4. Where does the curve represented by y = 2x^2 + x intercepts the x-axis?
  5. Where does the line represented by y = x intercepts the line represented by y = -x?

Calculus

  1. What is the maximum of the function y = -2x^2 + 3?
  2. What is the minimum of the function y = x^2 + 1?
  3. What is the derivative of y = x^2 + ln(x) + 3?
  4. What is the indefinite integral of x^2 + 1/x^2?
  5. What is the integral between -1 and 1 of x^3?

Matrix Algebra

  1. What is A + B?
  2. What is A * B?
  3. What is A transposed?
  4. What is the inverse of A?
  5. What is the inverse of B?

Basic Programming

The reference code and solution are written in R. However, feel free to write your code in any language you prefer.

  1. What isthe output of the following code?
    for (x in c(1, 2, 3, 4)) {
    y <- x * x
    if (y %% 2 == 0) print(paste(y, ' is even'))
    }
  2. What is the output of the following code?
    sum(c(1, 2, 3, 4) + 2)
  3. Write a function that calculates the mean of a given a list of numbers (do not use any pre-existing mean function). Use the function to print the mean of the numbers from 1 to 5.

Resources

Thank you for completing this self-test. If you are comfortable demonstrating the math skills demanded by these questions, you are likely equipped for the coursework in the Certificate in Statistical Analysis with R Programmiong. If you can't answer multiple questions or completed multiple questions incorrectly (see answer key below), we recommend completing the following resources and enrolling in certificate at a later date:

Algebra

https://www.khanacademy.org/math/algebra/x2f8bb11595b61c86:linear-equations-graphs

Calculus

Derivatives: Khan Academy, Differential calculus, especially Power Rule and Chain Rule sections

https://www.khanacademy.org/math/differential-calculus/taking-derivatives

Integrals: Khan Academy, Integrals

https://www.khanacademy.org/math/integral-calculus/indefinite-definite-integrals

Matrix Algebra

Stat Trek, Matrix Algebra Tutorial, complete through the Matrix inverse section

http://stattrek.com/tutorials/matrix-algebra-tutorial.aspx

Programming

A (very) short introduction to R

http://cran.r-project.org/doc/contrib/Torfs+Brauer-Short-R-Intro.pdf

Answers

Algebra

(1) y = x

The line goes through (0, 0) and (2, 2), and the equation of the line is y = mx + b

0 = m * 0 + b --> b = 0

2 = m * 2 + 0 --> m = 1

y = 1 x + 0 --> y = x


(2) 2

The slope is m in the equation y = mx + b. In this case, m = 2


(3) x = 0, y = 3

The y-axis is represented by x = 0. The intercept is y = 2 * 0 + 3 = 3


(4) x = 0 and x = -1/2

The x-axis is represented by y = 0. The intercept is 0 = 2x^2 + x = x(2x + 1). This equation is 0 when x = 0 or x = -1/2


(5) x = 0, y = 0

We know that y = x and y = -x. Then –x = x --> x = 0, and y = 0 

Calculus

(1) 3

The maximum makes the derivative 0. The derivative of –2x^2 + 3 is –4x. -4x = 0 --> x = 0, y = 3. The maximum is 3


(2) 1

The derivative of x^2 + 1 is 2x. 2x = 0 --> x = 0, y = 1. The maximum is 1.


(3) 2x + 1/x

The derivatives are: 2x --> x, ln(x) = 1/x, 3 --> 0.


(4) x^3/3 - 1/x + c

The integrals are x^2 --> x^3/3, 1/x^2 --> -1/x


(5) 0

The integral is x^4/4. 1^4/4 - (-1)^4/4 = 0

Matrix Algebra

(6) 

(7) 

(8)  Transpose = swapping rows and columns

(9) 

(10) B is not invertible; det(B) = 1 * 4 – 2 * 2 = 0, the matrix is not invertible

Basic Programming

(1) 4 is even 16 is even


(2) 18


(3)

my_mean = function(nums)

my_mean = sum(nums) / length(nums)

}

print(my_mean(1:5))

 

  Get our email newsletter with career tips, event invites and upcoming program info.       Sign Up Now