Self assessment quiz¶
Network science uses a wide array of mathematical and computational tools, includign calculus, linear algebra, probability, statistics, algorithms, data structure, and so on. You can use this (ungraded) quiz to identify your strengths and weaknesses in these areas. This will help you identify the areas you need to work on to succeed in this course.
Ch. 4 "Primer" from Working with Network Data (see Canvas) will be a useful reference to review and catch up on these topics but we will be happy to assist more. Please contact the instructor if you need help with any of these topics!
Linear algebra¶
$\vec{a} = \begin{bmatrix} 1 \\ 3 \\ 4 \end{bmatrix}$ and $\vec{b} = \begin{bmatrix} -1 \\ 0 \\ 1 \end{bmatrix}$. Calculate $\vec{a} \cdot \vec{b}$, and $\vec{a} + \vec{b}$.
$A = \begin{bmatrix}3 & 1 & 0\\2 & 1 & 5\end{bmatrix}$, calculate $A A^\top$.
What are the eigenvectors and eigenvalues? Can you explain what they mean conceptually?
Probability and Statistics¶
Explain the difference between joint probability and conditional probability.
Assume that $\text{Pr}(A, B) = \text{Pr}(A) \text{Pr}(B)$, what is the relationship between $A$ and $B$?
What is the definition of mean, median, mode, and standard deviation?
What is the Bayes theorem? Can you write it down and explain what each term means?
What is the expectation and variance of a Bernoulli distribution (with parameter $p$)?
What is the expectation and variance of a Poisson distribution (with parameter $\lambda$)?
What are the differences between a binomial distribution and a Poisson distribution?
Can you draw an empirical CDF (cumulative distribution function) of the following data?
1, 2, 2, 2, 3, 7, 10, 10
Assume that you are modeling the number of discrete (random) events that occur in a given time interval (e.g., how many buses pass a station in an hour). Which distribution will you use for your model? Assume that the data is given as the list of numbers above. What would be the likelihood function of your model?
Calculus¶
What is the derivative of $f(x) = a x^3 - b x^2 + e^x$?
Evaluate the following integral: $\int_{x}^{\infty} C y^{-\alpha} dy$.
$p(x) = C x^{-4}$ is a probability distribution function, which is defined where $1 \le x$. What is the value of $C$?
Solve for $x$? $$ \frac{dx}{dt} = \beta x $$
What will happen in a system described by the following equations? $$ \frac{dS}{dt} = -\beta S I \\ \frac{dI}{dt} = \beta S I $$
Programming¶
What's the time complexity of the following code?
total_sum = 0 for i in range(0, n): for j in range(0, n): total_sum += i + j
What is the result of the following Python code?
print("5" + "10") print(10*"5")
What would be the result of the following Python code? Can you explain why this is happening?
alist = [1,2,3] anotherlist = alist anotherlist[0] = 5 print(alist)
Write a function to calculate the mean, median, and standard deviation of a given list.
Can you implement a basic FIFO (first-in, first-out) queue class using Python's list?
You got salary data of the Acme Corporation. They are just numbers, not associated with names of the employees. Which Python data structure (among list, dictionary, and set) will you use to store this numbers? Justify your answer.
What are the differences of list, set, and dictionary? Explain when one should use one versus the other. Show some use case examples where using list is much more efficient than dictionary and vice versa.
In your script
myscript.py
, you want to use a functiondonothing()
defined in a module calledusefulfunctions
. How can you import this module (assuming it's installed or in the same directory) and use this function?