Throughout the exercise, probabilities will be rounded to $10^{-3}$ if necessary. A binary datum is data that can only take two values: 0 or 1. Data of this type is transmitted successively from one machine to another. Each machine transmits the received data either faithfully, that is, by transmitting the information as it received it (1 becomes 1 and 0 becomes 0), or in the opposite way (1 becomes 0 and 0 becomes 1). The transmission is faithful in $90\%$ of cases, and therefore opposite in $10\%$ of cases. Throughout the exercise, the first machine always receives the value 1. For any natural integer $n \geqslant 1$, we denote:
$V_n$ the event: ``the $n$-th machine holds the value 1'';
$\overline{V_n}$ the event: ``the $n$-th machine holds the value 0''.
Part A
a. Copy and complete the probability tree. b. Prove that $P(V_3) = 0{,}82$ and interpret this result in the context of the exercise. c. Given that the third machine received the value 1, calculate the probability that the second machine also received the value 1.
For any natural integer $n \geqslant 1$, we denote $p_n = P(V_n)$. The first machine received the value 1, so $p_1 = 1$. a. Prove that for any natural integer $n \geqslant 1$: $$p_{n+1} = 0{,}8\, p_n + 0{,}1.$$ b. Prove by induction that for any natural integer $n \geqslant 1$, $$p_n = 0{,}5 \times 0{,}8^{n-1} + 0{,}5.$$ c. Calculate the limit of $p_n$ as $n$ tends to infinity. Interpret this result in the context of the exercise.
Part B To model in Python language the transmission of the binary datum described at the beginning of the exercise, we consider the simulation function which takes as a parameter a natural integer $n$ which represents the number of transmissions carried out from one machine to another, and which returns the list of successive values of the binary datum. The incomplete script of this function is given below. We recall that the instruction rand() returns a random number from the interval $[0; 1[$. \begin{verbatim} def simulation(n): donnee = 1 liste = [donnee] for k in range(n): if rand() <0.1 donnee = 1 - donnee liste.append(donnee) return liste \end{verbatim} For example, simulation(3) can return $[1, 0, 0, 1]$.
Determine the role of the instructions on lines 5 and 6 of the algorithm above.
Calculate the probability that simulation(4) returns the list $[1,1,1,1,1]$ and the probability that simulation(6) returns the list $[1,0,1,0,0,1,1]$.
Throughout the exercise, probabilities will be rounded to $10^{-3}$ if necessary.\\
A binary datum is data that can only take two values: 0 or 1.\\
Data of this type is transmitted successively from one machine to another.\\
Each machine transmits the received data either faithfully, that is, by transmitting the information as it received it (1 becomes 1 and 0 becomes 0), or in the opposite way (1 becomes 0 and 0 becomes 1).\\
The transmission is faithful in $90\%$ of cases, and therefore opposite in $10\%$ of cases.\\
Throughout the exercise, the first machine always receives the value 1.
For any natural integer $n \geqslant 1$, we denote:
\begin{itemize}
\item $V_n$ the event: ``the $n$-th machine holds the value 1'';
\item $\overline{V_n}$ the event: ``the $n$-th machine holds the value 0''.
\end{itemize}
\textbf{Part A}
\begin{enumerate}
\item a. Copy and complete the probability tree.\\
b. Prove that $P(V_3) = 0{,}82$ and interpret this result in the context of the exercise.\\
c. Given that the third machine received the value 1, calculate the probability that the second machine also received the value 1.
\item For any natural integer $n \geqslant 1$, we denote $p_n = P(V_n)$.\\
The first machine received the value 1, so $p_1 = 1$.\\
a. Prove that for any natural integer $n \geqslant 1$:
$$p_{n+1} = 0{,}8\, p_n + 0{,}1.$$
b. Prove by induction that for any natural integer $n \geqslant 1$,
$$p_n = 0{,}5 \times 0{,}8^{n-1} + 0{,}5.$$
c. Calculate the limit of $p_n$ as $n$ tends to infinity. Interpret this result in the context of the exercise.
\end{enumerate}
\textbf{Part B}
To model in Python language the transmission of the binary datum described at the beginning of the exercise, we consider the simulation function which takes as a parameter a natural integer $n$ which represents the number of transmissions carried out from one machine to another, and which returns the list of successive values of the binary datum.\\
The incomplete script of this function is given below.\\
We recall that the instruction rand() returns a random number from the interval $[0; 1[$.
\begin{verbatim}
def simulation(n):
donnee = 1
liste = [donnee]
for k in range(n):
if rand() <0.1
donnee = 1 - donnee
liste.append(donnee)
return liste
\end{verbatim}
For example, simulation(3) can return $[1, 0, 0, 1]$.
\begin{enumerate}
\item Determine the role of the instructions on lines 5 and 6 of the algorithm above.
\item Calculate the probability that simulation(4) returns the list $[1,1,1,1,1]$ and the probability that simulation(6) returns the list $[1,0,1,0,0,1,1]$.
\end{enumerate}