> For the complete documentation index, see [llms.txt](https://justinthezhu.gitbook.io/stat110/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://justinthezhu.gitbook.io/stat110/untitled-4/questions.md).

# Questions

## Birthdays

Use Poisson approximations to investigate the following types of coincidences. The usual assumptions of the birthday problem apply, such as that there are 365 days in a year, with all days equally likely.

{% tabs %}
{% tab title="Q" %}
How many people are needed to have a 50% chance that at least one of them has the same birthday as *you*?
{% endtab %}

{% tab title="A" %}
Let $$k$$ be the number of people there are other than you. Create an indicator variable $$I\_i$$ for each of the $$k$$ people as to whether they have the same birthday as you. Then, $$P(I\_i = 1) = \frac{1}{365}$$ and thus $$E\left\[ \sum\_{i = 1}^{k} I\_i \right] = \frac{k}{365}$$. Therefore, we can model this as a $$\text{Pois} \left( \frac{k}{365} \right)$$ and so we just need to calculate

$$
1 - e^{-k/365} = 0.5
$$

It turns out that $$k \approx 253$$.
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Q" %}
How many people are needed to have a 50% chance that there are two people who not only were born on the same day, but also were born at the same hour (e.g., two people born between 2 pm and 3 pm are considered to have been born at the same hour).
{% endtab %}

{% tab title="A" %}
This is the birthday problem but with $$365 \cdot 24$$ types instead of just 365. Creating an indicator r.v. for whether each pair of $$k$$ people have the same birthday, we get that the number of pairs of people with the same birthday is distributed approximately $$\text{Pois} \left( \frac{{k \choose 2}}{365 \cdot 24} \right)$$ and thus the probability of at least people having the same birthday is approximately:

$$
1 - e^{-\frac{{k \choose 2}}{365 \cdot 24}}
$$

Setting it equal to $$\frac{1}{2}$$ gives us $$k = 111$$.
{% endtab %}
{% endtabs %}

## Uniform

Let $U \sim Unif(-1,1).$ Note that the PDF of $U$ is $f(x) = \frac{1}{2}$.

{% tabs %}
{% tab title="Q" %}
Compute $$E(U)$$
{% endtab %}

{% tab title="A" %}
$$E(U) = 0$$ because the distribution is symmetric about 0.
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Q" %}
Compute $$Var(U)$$
{% endtab %}

{% tab title="A" %}
We need to calculate $$E(U^2)$$ for the variance, so we have:

$$
E(U^2) = \int\_{-1}^{1} u^2 \cdot \frac{1}{2} d u = \left\[\frac{1}{6} u^3\right]\_{-1}^{1} = \frac{1}{3}
$$

Therefore, $$Var\left({U}\right) = E(U^2) - E(U)^2 = \boxed{\frac{1}{3}}$$
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Q" %}
Compute $$E(U^4)$$
{% endtab %}

{% tab title="A" %}
We use LOTUS (Law of the Unconscious Statistician) as before.

$$
E(U^4) = \int\_{-1}^{1} u^4 \cdot \frac{1}{2} d u = \left\[\frac{1}{10} u^5\right]\_{-1}^{1} = \boxed{\frac{1}{5}}
$$
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Q" %}
Find the CDF of $$U^2$$.
{% endtab %}

{% tab title="A" %}
We can describe the CDF of $$U^2$$ using the CDF of $$U$$.

$$
P(U^2 < k) = P(-\sqrt{k} < U < \sqrt{k}) = \frac{2\sqrt{k}}{2} = \boxed{\sqrt{k}}
$$
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Q" %}
Find the PDF of $$U^2$$.
{% endtab %}

{% tab title="A" %}
We take the derivative of the CDF of $$U^2$$ to obtain the PDF $$U$$.

$$
\frac{d}{dk} P(U^2 < k) = \boxed{\frac{1}{2 \sqrt{k}}}
$$
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Q" %}
Is $$U^2$$ a uniform distribution?
{% endtab %}

{% tab title="A" %}
The PDF of $$U^2$$ is $$\frac{1}{2 \sqrt{k}}$$. This is **not** a uniform distribution. This also shows that $$U^k$$ is not uniform anymore for any $$k > 1$$.
{% endtab %}
{% endtabs %}

## Normal

Let $$Z \sim N(0,1)$$ with CDF $$\Phi$$. The PDF of $$Z^2$$ is the function given by:

$$
g(w) = \frac{1}{\sqrt{2\pi w}} e^{-w/2}
$$

with a support of $$w \geq 0$$.

{% tabs %}
{% tab title="Q" %}
Find expressions for $$E(Z^4)$$ as integrals in two different ways one based on the PDF of $$Z$$ and the other based on the PDF of $$Z^2$$.
{% endtab %}

{% tab title="A" %}
Let $$W=Z^{2},$$ so $$W^{2}=Z^{4} .$$ By LOTUS

$$
E\left(Z^{4}\right)=\int\_{-\infty}^{\infty} z^{4} \varphi(z) d z=\int\_{0}^{\infty} w^{2} g(w) d w
$$

where $$\varphi(z)=\frac{1}{\sqrt{2 \pi}} e^{-z^{2} / 2}$$ is the PDF of $$Z,$$ and $$g$$ is as above.
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Q" %}
Find $$E(Z^2 + Z + \Phi(Z))$$.
{% endtab %}

{% tab title="A" %}
By linearity, this is $$E\left(Z^{2}\right)+E(Z)+E(\Phi(Z))$$. The second term is 0 and the first term is 1 since $$E(Z)=0, \operatorname{Var}(Z)=1 .$$ The third term is $$1 / 2$$ since by universality of the Uniform, $$\Phi(Z) \sim \operatorname{Unif}(0,1)$$. Thus, the value is $$3 / 2$$.
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Q" %}
Find the CDF of $$Z^2$$ in terms of $$\Phi$$; do not find the PDF of $$g$$.
{% endtab %}

{% tab title="A" %}
For $$w \leq 0,$$ the CDF of $$Z^{2}$$ is 0. For $$w>0,$$ the CDF of $$Z^{2}$$ is

$$
P\left(Z^{2} \leq w\right)=P(-\sqrt{w} \leq Z \leq \sqrt{w})=\Phi(\sqrt{w})-\Phi(-\sqrt{w})=2 \Phi(\sqrt{w})-1
$$
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://justinthezhu.gitbook.io/stat110/untitled-4/questions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
