Skip to content

Mathematics

Sathiyanarayanan S edited this page Feb 15, 2019 · 12 revisions

How to compute an inverse of matrix faster by playing around with some computational tricks?


What is Box-Cox Transformation? What are its significants?

Normality is an important assumption for many statistical techniques. A Box Cox transformation is a way to transform non-normal dependent variables into a normal shape. The Box-Cox transformation of the variable y is also indexed by λ, and is defined as

Box Cox transformation

λ usually takes a value between -2 to +2

Reference: An Analysis of Transformations G. E. P. Box and D. R. Cox Journal of the Royal Statistical Society. Series B (Methodological) Vol. 26, No. 2 (1964), pp. 211-252 https://www.ime.usp.br/~abe/lista/pdfQWaCMboK68.pdf


Given a random generator that produces a number 1 to 5 uniformly, write a function that produces a number from 1 to 7 uniformly.

Assume randX is the function that generates uniform random numbers from 1 to X

rand7 = (rand5 - 1) / 4 * 6 + 1

Once we have a uniform random number from 0 to 1, it can be scaled to any range by multiplying.


Find the second largest element in a Binary Search Tree

Do a inorder traversal of the tree, keep track of the previous element. When inorder traversal ends, the previous element is the second largest.


What is the significance of log odds?


A fair six-sided die is rolled twice. What is the probability of getting 2 on the first roll and not getting 4 on the second roll?

At first it appear complex but only two dices are rolled there are just 36 possibilities. When first condition is applied positive cases reduces to 6, When 2nd condition is applied positive cases further reduce to 5, so final required probability is 5/36.


There are 100 products and 25 of them are bad. What is the confidence interval?


What is Covariance? What is Correlation?


How to estimate the parameters in a uniform distribution for a given data set?

The parameters a = min(xi) b = max(xi)

A detailed derivation is given here https://math.stackexchange.com/a/2343976/256094