Categories

## ISI MStat PSA 2019 Problem 18 | Probability and Digits

This problem is a very easy and cute problem of probability from ISI MStat PSA 2019 Problem 18.

## Probability and Digits – ISI MStat Year 2019 PSA Problem 18

Draw one observation $N$ at random from the set $\{1,2, \ldots, 100\}$. What is the probability that the last digit of $N^{2}$ is $1$?

• $\frac{1}{20}$
• $\frac{1}{50}$
• $\frac{1}{10}$
• $\frac{1}{5}$

### Prerequisites

Last Digit of Natural Numbers

Basic Probability Theory

Combinatorics

Answer: is $\frac{1}{5}$

ISI MStat 2019 PSA Problem Number 18

A First Course in Probability by Sheldon Ross

## Try with Hints

Try to formulate the sample space. Observe that the sample space is not dependent on the number itself rather only on the last digits of the number $N$.

Also, observe that the number of integers in $\{1,2, \ldots, 100\}$ is uniformly distributed over the last digits. So the sample space can be taken as $\{0,1,2, \ldots, 9\}$. So, the number of elements in the sample space is $10$.

See the Food for Thought!

This step is easy.

Find out the cases for which $N^2$ gives 1 as the last digit. Use the reduced last digit sample space.

• 1 x 1
• 3 x 7 (Since $N^2$ and they must have the same last digit)
• 7 x 3 (Since $N^2$ and they must have the same last digit)
• 9 x 9

So, there are 2 possible cases out of 10.

Therefore the probability = $\frac{2}{10} = \frac{1}{5}$.

• Observe that there is a little bit of handwaving in the First Step. Please make it more precise using the ideas of Probability that it is okay to use the sample space as the reduced version rather than $\{1,2, \ldots, 100\}$.
• Generalize the problem for $\{1,2, \ldots, n\}$.
• Generalize the problems for $N^k$ for selecting an observation from $\{1,2, \ldots, n\}$.
• Generalize the problems for $N^k$ for selecting an observation from $\{1,2, \ldots, n\}$ for each of the digits from $\{0,1,2, \ldots, 9\}$.

Categories

## Shift the Curves | ISI MStat 2019 PSB Problem 1

This problem is an easy application in calculus using the basic ideas of curve sketching. This is the problem 1 from ISI MStat 2019 PSB.

## Problem- curve sketching

Let $f(x) = x^{3}-3 x+k,$ where $k$ is a real number. For what values of
$k$ will $f(x)$ have three distinct real roots?

## Solution

Science is all about asking proper questions. So, $k$ is the variable here. So, ask the following question,

What role is $k$ playing here? Let’s take $k = 0$ and see what happens.

$g(x) = x^{3}- 3x = x(x-\sqrt{3})(x+\sqrt{3})$.

We can easily draw the graph of this $g(x)$. Let’s draw it. So, $g(x)$ has roots as {$-\sqrt{3}, 0, \sqrt{3}$}.

Great, so addding $k$ to $g(x)$ will shift the graph upwards right?

Observe that if $k$ $\geq$ |lowest value of $g(x)$ at the bump|, then $f(x)$ will have less than three roots.

Similarly, observe that if $k$ $\leq$ – highest value of $g(x)$ at the bump, then $f(x)$ will have less than three roots.

So, let’s find them out. So, what is the mathematical significance of these bumps? They are the local maximum and minimum. How do we find them?

$g'(x) = 0$, where $g(x) = x^{3}- 3x$.

$\Rightarrow 3x^2 – 3 = 0 \Rightarrow x = \pm 1$.

So, the minimum and the maximum values of $g(x)$ are $g(-1) = 2$ and $g(1) = -2$.

Hence $-2 < k < 2$.

Let’s see what happens at $k = \pm 2$.

It is just that point, where the transitition for three roots to two roots occur and then to one root.

Observe that since, it is an odd degree, there will always be a reall root of the curve.

Stay Tuned! Stay Blessed!

## Food for Thought ( Think with Pictures )

• $f(x)$ has $n$ distinct roots $\Rightarrow$ $f'(x)$ has atleast $n-1$ distinct roots.
• Is the converse true? i.e. $f'(x)$ has $n-1$ distinct roots $\overset{?}{\Rightarrow}$ $f(x)$ has atleast $n$ distinct roots. Can you investigate using the given function?
• $f'(x)$ has $n-1$ distinct roots. Does there exist a $k$ such that $f(x)+k$ has atleast $n$ distinct roots?

Stay Tuned! Stay Blessed!

Categories

## Counting Double Subsets | ISI MStat 2014 Sample PSB Problem 3

This problem is an extension of the bijection principle idea used in counting the number of subsets of a set. This is ISI MStat 2014 Sample Paper PSB Problem 3.

## Problem

Let $S = \{1,2, \ldots, n\}$
(a) In how many ways can we choose two subsets $A$ and $B$ of $S$ so that $B \neq \emptyset$ and $B \subseteq A \subseteq S$ ?
(b) In how many of these cases is $B$ a proper subset of $A$ ?

### Prerequisites

• Generalization of the idea of counting the total number of subsets of a set.

## Solution

It is the same idea as counting the total number of subsets of a set. We used coding schemes.

Coding Scheme

We need three parameters to take note

• $b$ if that element is in $B \subseteq A$.
• $a$ if that element is extra in $A$ and not in $B$.
• $0$ if that element is not included in $A$ hence not in $B$.

Example

For $S = \{1,2, 3, 4, 5, 6\}$.

The coding scheme $(1, 2, 3, 4, 5, 6) = (a, b, 0, 0, a, a)$ means

$B = \{ 2 \}, A = \{ 1, 2, 5, 6\}$.

The total number of ssuch strings without any restrictions on number of $b$ or $a$ = $3^n$ since, for each of the $n$ elements of $S$, there are three options {$a, b$, 0}.

The total number of cases with $B = \emptyset$ = The total number of cases with zero $b$ = $2^n$, since for each of the $n$ elements of $S$, there are two options {$a$, 0}.

The total number of cases $B$ is not a proper subset of $A$ = The total number of cases {$A = B$} = The total number of cases with zero $a$ = $2^n$, since for each of the $n$ elements of $S$, there are two options {$b$, 0}.

#### (a)

We need to count how many such strings are there using atleast one $b$.

The total number of strings using atleast one $b$ =

the total number of cases without any restrictions – the total number of cases with zero $b$.

= $3^n – 2^n$

#### (b)

We need to count how many such strings are there using atleast one $a$ and one $b$.

The total number of strings using atleast one $a$ and one $b$ =

The total number of strings using atleast one $b$ – The total number of strings using atleast one $b$ and zero $a$

= The total number of strings using atleast one $b$ – The total number of strings using atleast one $b$ out of {$b, 0$}

= $3^n – 2^n$ – $2^n – 1$ = $3^n – 2^{n+1} +1$

#### Other Methods

You can also do it by using methods of Conditional Expectation and Smoothing method, taking a uniform distribution over $S$. If you have done it in that way, let us know, we will add the solution to the post.

Stay Tuned! Stay Blessed!

Categories

## Lock and Key | ISI MStat 2017 PSB | Problem 6

This problem is a beautiful and elegant probability based on an elementary problem on how to effectively choose the key to a lock. This gives a simulation environment to problem 6 of ISI MStat 2017 PSB.

## Problem

Suppose you have a 4-digit combination lock, but you have forgotten the correct combination. Consider the following three strategies to find the correct one:
(i) Try the combinations consecutively from 0000 to 9999.
(ii) Try combinations using simple random sampling with replacement from the set of all possible combinations.
(iii) Try combinations using simple random sampling without replacement from the set of all possible combinations.

Assume that the true combination was chosen uniformly at random from all possible combinations. Determine the expected number of attempts needed to find the correct combination in all three cases.

This problem really intrigues me, which gives me the excitement to solve and solve it.

### Prerequisite

• Expectation
• Simple Random Sampling With and Without Replacement
• Discrete Uniform Distribution
• Geometric Distribution
• Smoothing of Expectation $E_X(E(Y|X)) = E(Y)$. When $Y$ and $X$ have some relationship, this helps us to calculate the expectation.

## Solution

### Consecutive Combination

$U$ ~ Discrete Uniform $({0, 1, 2, …, 9999})$

Suppose, observe that if you select the keys consecutively, then for the true key $U$, you need $U$ attempts. (*)

$N$ denotes the number of attempts required = $U + 1$ due to (*)

$E(N) = E(U) = \frac{9999}{2}$.

### Simple Random Sampling With Replacement

This is something no one does, but let’s calculate this and see why we don’t do this and why we need to remember the keys that don’t work like SRSWOR, which is the next case.

$U$ ~ Discrete Uniform $({0, 1, 2, …, 9999})$

$N$ denotes the number of attempts required. $E_U(E(N|U)) = E(N)$

Let’s say, we have observed $U$, which is fixed and we will calculate $E(N|U)$.

Observe that $N|U$ ~ Geom(\frac{1}{10000}\), since, there are unlimited trials and success occurs if you pick up the right key $U$, which has a probability of $\frac{1}{10000}$.

Therefore, $E(N|U) = 10000$. Hence, $E(N) = E_U(E(N|U)) = 10000$

#### Let’s simulate it.

#Simple Random Sampling with Replacement

NUM = 0
size = 1000 # we have taken 1000 for easier calculation
key = sample(size,1)
number = NULL
random = sample(size,1)
N = 1
for (k in 1:1000) {
number = NULL

for (j in 1:100)
{
while (random != key)
{
random = sample(size,1)
N = N + 1
}
number = c(number,N)
random = sample(size,1)
N = 1
}
NUM = c(NUM,mean(number))
}
mean(NUM)
980.899
hist(NUM)
#Note Replace = TRUE will not work, since, this is an open-ended program

Hence, this is validated by our simulation.

### Simple Random Sampling Without Replacement

This is the sort of key selection, we usually do. Let’s investigate it.

$U$ ~ Discrete Uniform $({0, 1, 2, …, 9999})$

$N$ denotes the number of attempts required. $E_U(E(N|U)) = E(N)$

Let’s say, we have observed $U$, which is fixed and we will calculate $E(N|U)$.

$p_i = P ((N|U) = i) = \frac{9999}{10000}.\frac{9998}{9999}.\frac{9997}{9998}…\frac{10001-i}{10002-i}.\frac{1}{10001-i} = \frac{1}{10000}$

$E(N|U) = \sum_{i = 0}^{9999} ip_i = \sum_{i = 0}^{9999} i \cdot \frac{1}{10000} = \frac{9999}{2}$. Hence, $E(N) = E_U(E(N|U)) = \frac{9999}{2}$.

#Simple Random Sampling without Replacement
average = NULL
number = NULL
size = 10000
key = sample(size,1)
for (j in 1:1000)
{
for (i in 1:100)
{
option = sample(size,size, replace = FALSE)
v = which(option == key)
number = c(number,v)
}
average = c(average,mean(number))
}
mean(average)
4996.567
hist(average, freq = FALSE)

Stay tuned!

Stay Blessed!

Categories

## A Telescopic Sequence| ISI MStat 2018 PSB Problem 2

This is a beautiful problem from ISI MStat 2018 problem 2, which uses the cute little ideas of telescopic sum and partial fractions.

## Problem

Let $\{x_{n}\}_{n \geq 1}$ be a sequence defined by $x_{1}=1$ and
$$x_{n+1}=\left(x_{n}^{3}+\frac{1}{n(n+1)(n+2)}\right)^{1 / 3}, \quad n \geq 1$$
Show that $\{x_{n}\}_{n \geq 1}$ converges and find its limit.

### Prerequisities

• Limit of a Sequence
• Partial Fraction $\frac{1}{n(n+1)(n+2)} = \frac1{n(n+1)(n+2)}=\frac12\cdot\frac1n-\frac1{n+1}+\frac12\cdot\frac1{n+2} = -\frac12\left(\underbrace{\frac1{n+1} -\frac1n}\right)+\frac12\left(\underbrace{\frac1{n+2}-\frac1{n+1}}\right)$
• Telescopic Sum $\sum_{i = 1}^{\infty} \left(\underbrace{\frac1{i+1} -\frac1i}\right) = \lim_{n \to \infty} \frac1n – 1 = -1$

## Solution

$x_{n+1} = (x_{n}^{3}+\frac{1}{n(n+1)(n+2)})^{1 / 3} \Rightarrow {x_{n+1}}^3 = x_{n}^{3}+\frac{1}{n(n+1)(n+2)}$

$\Rightarrow {x_{n+1}}^3 – x_{n}^{3} = \frac{1}{i(i+1)(i+2)}; x_1 = 1$.

$\Rightarrow \sum_{i = 1}^{n-1} {x_{i+1}}^3 – x_{i}^{3} = \sum_{i = 1}^{n-1} \frac{1}{n(n+1)(n+2)} ; x_1 = 1$.

$x_{n}^{3} – x_{1}^{3} = \sum_{i = 1}^{n-1} \frac{1}{i(i+1)(i+2)} = \sum_{i = 1}^{n-1} -\frac12\left(\underbrace{\frac1{i+1} -\frac1i}\right)+\frac12\left(\underbrace{\frac1{i+2}-\frac1{i+1}}\right)$

$\lim_{n \to \infty} (x_{n}^{3} – x_{1}^{3}) = \sum_{i = 1}^{\infty} \frac{1}{i(i+1)(i+2)} = \sum_{i = 1}^{\infty} -\frac12\left(\underbrace{\frac1{i+1} -\frac1i}\right)+\frac12\left(\underbrace{\frac1{i+2}-\frac1{i+1}}\right) = \frac14$

$\lim_{n \to \infty} x_{n}^{3} = \frac54 \Rightarrow \lim_{n \to \infty} x_{n} = ({\frac54})^\frac13$.

Categories

## The Unique Decomposition | ISI MStat 2015 PSB Problem 3

The solution plays with Eigen values and vectors to solve this cute and easy problem in Linear Algebra from the ISI MStat 2015 problem 3.

## Problem

Let $A$ be a real valued and symmetric $n \times n$ matrix with entries such that $A \neq \pm I$ and $A^{2}=I$.
(a) Prove that there exist non-zero column vectors $v$ and $w$ such that
$A v=v$ and $A w=-w$.
(b) Prove that every vector $z$ has a unique decomposition $z=x+y$
where $A x=x$ and $A y=-y$.

This problem is from ISI MStat 2015 PSB ( Problem #3).

### Prerequisites

• Eigen values and Eigen vectors

## (a)

Let’s say $\lambda$ is an eigenvalue of $A$. Let’s explore the possibilities of $\lambda$.

$Av= \lambda v \Rightarrow A^2v= {\lambda}^2 v \Rightarrow Iv= {\lambda}^2 v \Rightarrow v= {\lambda}^2 v$. Since, $v$ is arbitrary, we get ${\lambda}^2 = 1 \Rightarrow \lambda = \pm 1$.

Since $A$ is real symmetric, it has real eigenvalues, and the possibilities are 1 and -1. Since, $A \neq \pm I$, there exists non-zero column vectors $v$ and $w$ such that $A v=1.v$ and $A w=-1.w$.

## (b)

Suppose $z$ has two decompositions $z= x+y = x’+y’$ where $A x=x$ and $A y=-y$ and $A x’=x’$ and $A y’=-y’$.

Tberefore, $A(x+y) = A(x’+y’) \Rightarrow Ax+Ay = Ax’+Ay’ \Rightarrow x – y = x’ – y’$.

But, we also have $x+y = x’+y’$. Thus, by adding and subtracting, we get $x = x’, y = y’$.

Categories

## Invariant Regression Estimate | ISI MStat 2016 PSB Problem 7

This cute little problem gives us the wisdom that when we minimize two functions at a single point uniquely, then their sum is also minimized at the same point. This Invariant Regression Estimate is applied to calculate the least square estimates of two group regression from ISI MStat 2016 Problem 7.

## Problem- Invariant Regression Estimate

Suppose ${(y_{i}, x_{1 i}, x_{2 i}, \ldots, x_{k i}): i=1,2, \ldots, n_{1}+n_{2}}$ represents a set of multivariate observations. It is found that the least squares linear regression fit of $y$ on $\left(x_{1}, \ldots, x_{k}\right)$ based on the first $n_{1}$ observations is the same as that based on the remaining $n_{2}$ observations, and is given by
$y=\hat{\beta}_{0}+\sum_{j=1}^{k} \hat{\beta}_{j} x_{j}$
If the regression is now performed using all $\left(n_{1}+n_{2}\right)$ observations, will the regression equation remain the same? Justify your answer.

### Prerequisites

• $f(\tilde{x})$ and $g(\tilde{x})$ are both uniquely minimized at $\tilde{x} = \tilde{x_0}$, then $f(\tilde{x}) + g(\tilde{x})$ is uniquely minimized at $\tilde{x} = \tilde{x_0}$.

## Solution

Observe that we need to find the OLS estimates of ${\beta}{i} \forall i$.

$f(\tilde{\beta}) = \sum_{i = 1}^{n_1} (y – {\beta}_{0} – (\sum_{j=1}^{k} \hat{\beta}_{j} x_{j}))^2$, where $\tilde{\beta} = ({\beta}_0, {\beta}_1, …, {\beta}_k )$

$g(\tilde{\beta}) = \sum_{i = n_1}^{n_1+n_2} (y – {\beta}_{0} – (\sum_{j=1}^{k} \hat{\beta}_{j} x_{j}))^2$, where $\tilde{\beta} = ({\beta}_0, {\beta}_1, …, {\beta}_k )$

$\hat{\tilde{\beta}} = (\hat{{\beta}_0}, \hat{{\beta}_1}, …, \hat{{\beta}_k )}$

$h(\tilde{\beta}) = f(\tilde{\beta}) + g(\tilde{\beta}) = \sum_{i = 1}^{n_1+n_2} (y – {\beta}_{0} – (\sum_{j=1}^{k} \hat{\beta}_{j} x_{j}))^2$, where $\tilde{\beta} = ({\beta}_0, {\beta}_1, …, {\beta}_k )$.

Now, $h(\tilde{\beta})$ is the loss squared erorr under the grouped regression, which needs to be minimized with respect to $\tilde{\beta}$.

Now, by the given conditions, $f(\tilde{\beta})$ and $g(\tilde{\beta})$ are both uniquely minimized at $\hat{\tilde{\beta}}$, therefore $h(\tilde{\beta}) = f(\tilde{\beta}) + g(\tilde{\beta})$ will be uniquely minimized at $\hat{\tilde{\beta}}$ by the prerequisite.

Hence, the final estimate of $\tilde{\beta}$ will be $\hat{\tilde{\beta}}$.

Categories

## Discover the Covariance | ISI MStat 2016 Problem 6

This problem from ISI MStat 2016 is an application of the ideas of indicator and independent variables and covariance of two summative random variables.

## Problem- Covariance Problem

Let $X_{1}, \ldots, X_{n}$ ~ $X$ be i.i.d. random variables from a continuous distribution whose density is symmetric around 0. Suppose $E\left(\left|X\right|\right)=2$ . Define $Y=\sum_{i=1}^{n} X_{i} \quad \text { and } \quad Z=\sum_{i=1}^{n} 1\left(X_{i}>0\right)$.
Calculate the covariance between $Y$ and $Z$.

This problem is from ISI MStat 2016 (Problem #6)

### Prerequisites

1. X has Symmetric Distribution around 0 $\Rightarrow E(X) = 0$.
2. $|X| = X.1( X > 0 ) – X.1( X \leq 0 ) = 2X.1( X > 0 ) – X$, where $X$ is a random variable.
3. $X_i$ and $X_j$ are independent $\Rightarrow$ $g( X_i)$ and $f(X_j)$ are independent.
4. $A$ and $B$ are independent $\Rightarrow Cov(A,B) = 0$.

## Solution

$2 = E(|X|) = E(X.1(X >0)) – E(X.1(X \leq 0)) = E(2X.1( X > 0 )) – E(X) = 2E(X.1( X > 0 ))$

$\Rightarrow E(X.1( X > 0 )) = 1 \overset{E(X) = 0}{\Rightarrow} Cov(X, 1( X > 0 )) = 1$.

Let’s calculate the covariance of $Y$ and $Z$.

$Cov(Y, Z) = \sum_{i,j = 1}^{n} Cov( X_i, 1(X_{j}>0))$

$= \sum_{i = 1}^{n} Cov( X_i, 1(X_{i}>0)) + \sum_{i,j = 1, i \neq j}^{n} Cov( X_i, 1(X_{j}>0))$

$\overset{X_i \text{&} X_j \text{are independent}}{=} \sum_{i = 1}^{n} Cov( X_i, 1(X_{i}>0)) = \sum_{i = 1}^{n} 1 = n$.

Categories

## Tracing the Trace | ISI MStat 2016 PSB Problem 3

This ISI MStat 2016 problem is an application of the ideas of tracing the trace and Eigen values of a matrix and using a cute sum of squares identity.

## Problem- Tracing the Trace

Suppose A is an $n Ã— n$ real symmetric matrix such that
$Tr(A^2) = T r(A) = n$. Show that all the eigenvalues of A are equal to 1.

This problem is from ISI MStat 2016 PSB ( Problem #3)

### Prerequisites

• Trace of a Matrix
• Eigen values of $A^n$ w.r.t to the eigen values of $A$.
• Sum of Squares $\geq 0$.

## Solution

$Av = {\lambda}v \Rightarrow A^nv = {\lambda}^nv$.

Since, A is a real symmetric matrix, then all the eigen values of the matrix A are real say {${\lambda}_1, {\lambda}_2, …, {\lambda}_n$}.

$Tr(A^2) = \sum_{i=1}^{n} {{\lambda}_i}^2 = Tr(A) = \sum_{i=1}^{n} {{\lambda}_i} = n$

$\Rightarrow n\sum_{i=1}^{n} {{\lambda}_i}^2 = (\sum_{i=1}^{n} {{\lambda}_i})^2$

$\Rightarrow (n-1)\sum_{i=1}^{n} {{\lambda}_i}^2 = \sum_{i, j = 1, i \neq j }^{n} 2{\lambda}_i{\lambda}_j$

$\Rightarrow \sum_{i=1}^{n} ({{\lambda}_i – {\lambda}_j })^2 = 0$

$\Rightarrow {\lambda}_i = {\lambda}_j = \lambda \forall i \neq j$

$\Rightarrow Tr(A) = n\lambda = n \Rightarrow \lambda = 1$.

Categories

## Inverse Uniform Distribution | ISI MStat 2007 PSB Problem 4

This problem is an interesting application of the inverse uniform distribution family, which has infinite mean. This problem is from ISI MStat 2007. The problem is verified by simulation.

## Problem

The unit interval (0,1) is divided into two sub-intervals by picking a point at random from inside the interval. Denoting by $Y$ and $Z$ the
lengths of the long and the shorter sub-intervals respectively show that $\frac{Y}{Z}$ does not have a finite expectation.

This is the 4th Problem ISI MStat 2008. Enjoy it.

### Prerequisites

• Distribution Function
• Distribution Function of $\frac{1}{X}$ in terms of the Distribution Function of $X$.

## Solution

$\frac{Y}{Z} + 1 = \frac{Y+Z}{Z} = \frac{1}{Z}$, where $Z$ is the shorter length of the broken stick.

So, $E( \frac{Y}{Z}) = E(\frac{1}{Z}) – 1$.

Let’s try to find the distribution of $\frac{1}{Z}$.

Let $U$ ~ Unif $(0,1)$ whcih denotes the random uniform cut.

The shorter stick of length smaller than $x$ can be achieved if the stick is cut either before $x$ or it is cut after $1-x$.

Observe that $P( Z \leq x) = P ( U \leq x ) + P ( U \geq 1 – x) = x + 1 – (1-x) = 2x$. This answer is natural since, the total valid length is $2x$.

$P( \frac{1}{Z} \leq z) = P ( Z \geq \frac{1}{z} ) = 1 – \frac{2}{z} \Rightarrow F_{\frac{1}{Z}}(z) = 1 – \frac{2}{z}$ if $2 \leq z < \infty$.

Therefore, $f_{\frac{1}{Z}}(z) = \frac{2}{z^2}$ if $2 \leq z < \infty$.

Hence, $E( \frac{Y}{Z}) = E(\frac{1}{Z}) – 1 = (\int_{2}^{\infty} \frac{2}{z} dz) – 1 = \infty$

## Simulation and Verification

Exercise: Prove that $F_{\frac{Y}{Z}}(x) = \frac{(x-1)}{(x+1)}$ if $1 \leq x < \infty$.

 u = runif(1000,0,1)
w = 1 - u
Z = pmin(u,w)
Y = pmax(u,w)
YbyZ = Y/Z
plot(ecdf(YbyZ), xlim = c(0,50))
x = seq(0, 50, 0.01)
curve((x - 1)/(x+1), from = 0, col = "red", add = TRUE)

The Mean moves really slowly to infinity ~ logx. Hence it is really hard to show it is going to $\infty$. Also, the probability of occurrence of high value is almost 0. Hence, it really hard to show my simulation that the mean is $\infty$. But, we can show that the mean of the maximum values is really large.

v = rep(0,200)
m = NULL
for ( i in 1:200)
{
#v[i] = 100*i
u = runif(10000,0,1)
w = 1 - u
Z = pmin(u,w)
Y = pmax(u,w)
YbyZ = Y/Z
m = c(m, max(YbyZ))
}
mean(m) = 79079.43

Beware of the simulation, it can be totally counterintuitive. This is really enjoyable though.

Stay Tuned!