Solved – How to find the number of runs

How to find the number of runs in the following aaaabbabbbaabba bbaaaaaabbbbaaaaaaa Best Answer If you want do this in R, check out the rle function. For example: > ext <- function(x) {strsplit(x, "")[[1]]} > x <- ext("aaaabbabbbaabba") > y <- ext("bbaaaaaabbbbaaaaaaa") > length(rle(x)$lengths) [1] 7 > length(rle(y)$lengths) [1] 4 See also this related question … Read more

Solved – Is a neural network essential for deep learning

I received preliminary materials on deep learning in my class. It was written as follows. This raised me the question of the basic meaning of the word deep learning. Deep learning is a machine learning method using a multi-layer neural network. Is a neural network essential for deep learning? Isn't it possible to do deep … Read more

Solved – Is a neural network essential for deep learning

I received preliminary materials on deep learning in my class. It was written as follows. This raised me the question of the basic meaning of the word deep learning. Deep learning is a machine learning method using a multi-layer neural network. Is a neural network essential for deep learning? Isn't it possible to do deep … Read more

Solved – Exponential distribution Q-Q plot homework question

For an exponential QQ plot, we fix the theoretical distribution to have $λ=1$. In order to compare the plotted points with the line $y=x$, what kind of rescaling should be applied to the data and why? “Hint“ given with this problem: If $X$ follows an exponential distribution with parameter $λ$, then $λX$ follows an exponential … Read more

Solved – Exponential distribution Q-Q plot homework question

For an exponential QQ plot, we fix the theoretical distribution to have $λ=1$. In order to compare the plotted points with the line $y=x$, what kind of rescaling should be applied to the data and why? “Hint“ given with this problem: If $X$ follows an exponential distribution with parameter $λ$, then $λX$ follows an exponential … Read more

Solved – Expected number of dice rolls require to make a sum greater than or equal to K

A 6 sided die is rolled iteratively. What is the expected number of rolls required to make a sum greater than or equal to K? Before Edit P(Sum>=1 in exactly 1 roll)=1 P(Sum>=2 in exactly 1 roll)=5/6 P(Sum>=2 in exactly 2 rolls)=1/6 P(Sum>=3 in exactly 1 roll)=5/6 P(Sum>=3 in exactly 2 rolls)=2/6 P(Sum>=3 in exactly … Read more

Solved – Expected number of dice rolls require to make a sum greater than or equal to K

A 6 sided die is rolled iteratively. What is the expected number of rolls required to make a sum greater than or equal to K? Before Edit P(Sum>=1 in exactly 1 roll)=1 P(Sum>=2 in exactly 1 roll)=5/6 P(Sum>=2 in exactly 2 rolls)=1/6 P(Sum>=3 in exactly 1 roll)=5/6 P(Sum>=3 in exactly 2 rolls)=2/6 P(Sum>=3 in exactly … Read more

Solved – invariance of correlation to linear transformation: $text{corr}(aX+b, cY+d) = text{corr}(X,Y)$

This is actually one of the problems in Gujarati's Basic Econometrics 4th edition (Q3.11) and says that the correlation coefficient is invariant with respect to the change of origin and scale, that is $$text{corr}(aX+b, cY+d) = text{corr}(X,Y)$$ where $a$,$b$,$c$,$d$ are arbitrary constants. But my main question is the following: Let $X$ and $Y$ be paired … Read more

Solved – invariance of correlation to linear transformation: $text{corr}(aX+b, cY+d) = text{corr}(X,Y)$

This is actually one of the problems in Gujarati's Basic Econometrics 4th edition (Q3.11) and says that the correlation coefficient is invariant with respect to the change of origin and scale, that is $$text{corr}(aX+b, cY+d) = text{corr}(X,Y)$$ where $a$,$b$,$c$,$d$ are arbitrary constants. But my main question is the following: Let $X$ and $Y$ be paired … Read more