Problem finding the limit of a random variable sequence ( attempt included ) Let $X$ be a real random variable defined in the probability space $(\Omega, \mathcal A, P)$

*

*Suppose we have a set $B_k = \{|X|:|X|\in [\frac{1}{k}, k]\}$, with $k ∈ \mathbb N$, prove that $B_k\in \mathcal A.$


*Let $(Y_k), k\in\mathbb N$, be a sequence of positive real random variables such that  $Y_k= |X|\mathbf{1}_{B_k}$. Prove that $P(\lim_{k\to \infty} Y_k = |X|) = 1.$
($\mathbf{1}_{B_k}$ is the indicator function).
my attempt :

*

*For the first question, we have X a measurable function and  $[\frac{1}{k}, k]$ is a borel set therefore the results.

2.Now here is where I have a problem, I tried to prove that $\lim_{k\to \infty} Y_k = |X|$ using the fact that $\lim_{k\to \infty}\frac{1}{k}$=0 and when $\lim_{k\to \infty} K=+\infty$ therefore we have the indicator function on the positive real line always equals to 1 therefore we get that equality but I don't know where to go with that, I don't know how the probability equals to 1 and it kinda feels wrong to reason like that because what I get is P(X) with no assigned value to X which doesnt make sense I guess?
Any help or hint would be appreciated :).
 A: First of all, I think you meant $B_k:=\{\omega\in \Omega: |X(\omega)|\in [\frac{1}{k}, k]\}.$ The way you have defined the set $B_k,$ it is a subset of $\mathbb{R}.$
Now for your second problem. The question is essentially saying that $Y_k\to |X|$ almost surely. Consider the set $Z:=\{\omega: 0\le |X(\omega)|<\infty\}$. Observe that $P(Z)=1.$
We now want to show that if  $\omega\in Z,$ then $Y_k(\omega)\to |X|.$ To see this, firs consider the $\omega\in Z$ Such that $|X(\omega)|=x\neq 0.$ Then there exists $k_0$ such that $\frac{1}{k}\le |X(\omega)|\le k$ for all $k\ge k_0.$ In other words, $Y_{k}(\omega)=|X|(\omega)$ for all $k\ge k_0.$ This proves the claim.
The case when $|X(\omega)|=0$ need to be handled separately. But it is easy. Note that if $|X(\omega)|=0,$ then $Y_k(\omega)=0$ for all $k.$
A: Hint
$B_k$ has no sense as written ! It should rather be $$B_k:=\left\{\omega \in \Omega \mid |X(\omega )|\in\left[\frac{1}{k},k\right]\right\}.$$
But the idea is correct. For the second question, since $$B_k\nearrow \{|X|>0\},$$
i.e. $B_k\subset B_{k+1}$ for all $k$, and $$\bigcup_{k\in\mathbb N}B_k=\{|X|>0\},$$
you have that $$\boldsymbol 1_{B_k}\nearrow \boldsymbol 1_{\{ |X|>0\}}.$$
