Difference between revisions of "Aufgaben:Exercise 2.3: Algebraic Sum of Binary Numbers"

From LNTwww
(Die Seite wurde neu angelegt: „ {{quiz-Header|Buchseite=Stochastische Signaltheorie/Binomialverteilung }} right| :Ein Zufallsgenerator gibt zu jedem Taktzeit…“)
 
 
(23 intermediate revisions by 4 users not shown)
Line 1: Line 1:
  
{{quiz-Header|Buchseite=Stochastische Signaltheorie/Binomialverteilung
+
{{quiz-Header|Buchseite=Theory_of_Stochastic_Signals/Binomial_Distribution
 
}}
 
}}
  
[[File:P_ID86__Sto_A_2_3.png|right|]]
+
[[File:EN_Sto_A_2_3_neu.png|right|frame|Considered random generator]]
:Ein Zufallsgenerator gibt zu jedem Taktzeitpunkt (<i>&nu;</i>) eine bin&auml;re Zufallszahl <i>x<sub>&nu;</sub></i> ab, die 0 oder 1 sein kann. Der Wert &bdquo;1&rdquo; tritt mit Wahrscheinlichkeit <i>p</i> = 0.25 auf; die einzelnen Werte <i>x<sub>&nu;</sub></i> seien statistisch voneinander unabh&auml;ngig.
+
A random number generator outputs a binary random number &nbsp; $x_\nu$&nbsp; at each clock time&nbsp; $(\nu)$&nbsp;, which can be&nbsp; $0$&nbsp; or&nbsp; $1$&nbsp;.
 +
*The value&nbsp; "1"&nbsp; occurs with probability&nbsp; $p = 0.25$&nbsp;.
 +
*The individual values&nbsp;  $x_\nu$&nbsp; are statistically independent of each other.
  
:Die Bin&auml;rzahlen werden in ein Schieberegister mit <i>I</i> = 6 Speicherzellen abgelegt. Zu jedem Taktzeitpunkt wird der Inhalt dieses Schieberegisters um eine Stelle nach rechts verschoben und jeweils die algebraische Summe <i>y<sub>&nu;</sub></i> der Schieberegisterinhalte gebildet:
 
:$$y_{\nu}=\sum\limits_{i=0}^{5}x_{\nu-i}=x_{\nu}+x_{\nu-1}+...+x_{\nu-5}.$$
 
  
:<b>Hinweis</b>: Diese Aufgabe bezieht sich auf den gesamten Lehrstoff von Kapitel 2.3. Zur Kontrolle Ihrer Ergebnisse können Sie folgendes Berechnungsmodul benutzen:
+
The binary numbers are stored in a shift register with&nbsp; $I = 6$&nbsp; memory cells.
  
 +
At each clock instant,&nbsp; the contents of this shift register are shifted one place to the right and the algebraic sum&nbsp; $y_\nu$&nbsp; of the shift register contents is formed in each case:
 +
:$$y_{\nu}=\sum\limits_{i=0}^{5}x_{\nu-i}=x_{\nu}+x_{\nu-1}+\ \text{...} \ +x_{\nu-5}.$$
  
===Fragebogen===
+
 
 +
 
 +
 
 +
Hints:
 +
*The exercise belongs to the chapter&nbsp; [[Theory_of_Stochastic_Signals/Binomial_Distribution|Binomial Distribution]].
 +
 +
*To check your results you can use the interactive HTML5/JavaScript applet&nbsp; [[Applets:Binomial_and_Poisson_Distribution_(Applet)|Binomial and Poisson distribution]].
 +
 
 +
 
 +
 
 +
 
 +
 
 +
===Questions===
  
 
<quiz display=simple>
 
<quiz display=simple>
{Welche Werte kann <i>y</i> annehmen? Was ist der gr&ouml;&szlig;tm&ouml;gliche Wert?
+
{What values can the sum&nbsp; $y$&nbsp; take?&nbsp; What is the largest possible value?
 
|type="{}"}
 
|type="{}"}
$y_\max$ = { 6 3% }
+
$y_\max \ = \ $ { 6 3% }
  
  
{Berechnen Sie die Wahrscheinlichkeit, dass <i>y</i> gr&ouml;&szlig;er als 2 ist.
+
{Calculate the probability that&nbsp; $y$&nbsp; is greater than&nbsp; $2$.
 
|type="{}"}
 
|type="{}"}
$Pr(y > 2)$ = { 0.169 3% }
+
${\rm Pr}(y > 2) \ = \ $ { 0.169 3% }
  
  
{Wie gro&szlig; ist der Mittelwert der Zufallsgr&ouml;&szlig;e <i>y</i>?
+
{What is the mean value of the random variable&nbsp; $y$?
 
|type="{}"}
 
|type="{}"}
$m_y$ = { 1.5 3% }
+
$m_y \ =$ { 1.5 3% }
  
  
{Ermitteln Sie die Streuung der Zufallsgr&ouml;&szlig;e <i>y</i>.  
+
{Find the standard deviation of the random variable&nbsp; $y$.  
 
|type="{}"}
 
|type="{}"}
$\sigma_y$ = { 1.061 3% }
+
$\sigma_y \ = \ $ { 1.061 3% }
  
  
{Sind die Zufallszahlen <i>y<sub>&nu;</sub></i> unabh&auml;ngig? Begr&uuml;nden Sie Ihr Ergebnis.
+
{Are the random numbers&nbsp; $y_\nu$&nbsp; statistically independent?&nbsp; Justify your result.
|type="[]"}
+
|type="()"}
- Die Zufallszahlen sind statistisch unabh&auml;ngig.
+
- The random numbers are statistically independent.
+ Die Zufallszahlen sind statistisch abh&auml;ngig.
+
+ The random numbers are statistically dependent.
  
  
{Wie groß ist die bedingte Wahrscheinlichkeit, dass <i>y</i><sub><i>&nu;</i></sub> wieder gleich <i>&mu;</i> ist, wenn vorher <i>y</i><sub><i>&nu;</i>&ndash;1</sub> = <i>&mu;</i> aufgetreten ist? (<i>&mu;</i> = 0,1, ... , <i>I</i>).
+
{What is the conditional probability that&nbsp; $y_\nu = \mu$&nbsp; if&nbsp; $y_{\nu-1} = \mu$&nbsp; occured previously?&nbsp; $(\mu = 0, \ 1, \ \text{...} \ , \ I)$.
 
|type="{}"}
 
|type="{}"}
$Pr(y_v = \mu | y_\text{$\upsilon - 1$} = \mu )$ = { 0.625 3% }
+
${\rm Pr}(y_\nu = \mu \hspace{0.05cm} | \hspace{0.05cm} y_{\nu-1} = \mu ) \ = \ $ { 0.625 3% }
  
  
 
</quiz>
 
</quiz>
  
===Musterlösung===
+
===Solution===
 
{{ML-Kopf}}
 
{{ML-Kopf}}
:<b>1.</b>&nbsp;&nbsp;In jeder Zelle kann eine 0 oder eine 1 stehen; deshalb kann die Summe alle ganzzahligen Werte zwischen 0 und 6 annehmen:
+
'''(1)'''&nbsp; Each cell can contain a&nbsp; $0$&nbsp; or a&nbsp; $1$&nbsp;.&nbsp; Therefore,&nbsp; the sum can take all integer values between&nbsp; $0$&nbsp; ánd&nbsp; $6$&nbsp;:
:$$y_{\nu}\in\{0,1,...,6\}\hspace{0.3cm}\Rightarrow\hspace{0.3cm}
+
:$$y_{\nu}\in\{0,1,\ \text{...} \ ,6\}\hspace{0.3cm}\Rightarrow\hspace{0.3cm}
 
y_{\rm max} \hspace{0.15cm} \underline{= 6}.$$
 
y_{\rm max} \hspace{0.15cm} \underline{= 6}.$$
  
:<b>2.</b>&nbsp;&nbsp;Es liegt eine Binomialverteilung vor. Daher gilt mit <i>p</i> = 0.25:
 
:$$\rm Pr(\it y =\rm 0)=(\rm 1-\it p)^{\it I}=\rm 0.75^6=0.178,$$
 
:$$\rm Pr(\it y=\rm 1)=\rm \left({\it I \atop {\rm 1}}\right)\cdot (\rm 1-\it p)^{\it I-\rm 1}\cdot \it p= \rm 6\cdot 0.75^5\cdot 0.25=0.356,$$
 
:$$\rm Pr(\it y=\rm 2)=\rm \left({\it I \atop {\rm 2}}\right)\cdot (\rm 1-\it p)^{\it I-\rm 2}\cdot \it p^{\rm 2}= \rm 15\cdot 0.75^4\cdot 0.25^2=0.297,$$
 
:$$\rm Pr(\it y>\rm 2)=\rm 1-Pr(\it y=\rm 0)-\rm Pr(\it y=\rm 1)-\rm Pr(\it y=\rm 2)\hspace{0.15cm} \underline{=\rm 0.169}.$$
 
  
:<b>3.</b>&nbsp;&nbsp;Nach der allgemeinen Gleichung gilt  f&uuml;r den Mittelwert der Binomialverteilung:
 
:$$\it m_y=\it I\cdot p\hspace{0.15cm} \underline{=\rm 1.5}.$$
 
  
:<b>4.</b>&nbsp;&nbsp;Entsprechend gilt f&uuml;r die Streuung der Binomialverteilung:
+
'''(2)'''&nbsp; There is a binomial distribution.&nbsp; Therefore,&nbsp; with&nbsp; $p = 0.25$:
:$$\it \sigma_y=\sqrt{\it I \cdot p \cdot(\rm 1-\it p)} \hspace{0.15cm} \underline{= \rm 1.061}.$$
+
:$${\rm Pr}(y =0)=(1-p)^{\it I}=0.75^6=0.178,$$
 +
:$${\rm Pr}(y=1)=\left({ I \atop {1}}\right)\cdot (1-p)^{I-1}\cdot p= \rm 6\cdot 0.75^5\cdot 0.25=0.356,$$
 +
:$${\rm Pr}(y=2)=\left({ I \atop { 2}}\right)\cdot (1-p)^{I-2}\cdot p^{\rm 2}= \rm 15\cdot 0.75^4\cdot 0.25^2=0.297,$$
 +
:$$\Rightarrow \hspace{0.3cm}{\rm Pr}(y>2)=1-{\rm Pr}(y=0)-{\rm Pr}( y=1)-{\rm Pr}( y=2)\hspace{0.15cm} \underline{=\rm 0.169}.$$
 +
 
 +
 
 +
 
 +
'''(3)'''&nbsp; According to the general equation,&nbsp; the mean of the binomial distribution is:
 +
:$$m_y= I\cdot p\hspace{0.15cm} \underline{=\rm 1.5}.$$
 +
 
 +
 
 +
 
 +
'''(4)'''&nbsp; Accordingly,&nbsp; for the standard deviation of the binomial distribution:
 +
:$$\sigma_y=\sqrt{ I \cdot p \cdot( 1- p)} \hspace{0.15cm} \underline{= \rm 1.061}.$$
 +
 
 +
 
 +
 
 +
'''(5)'''&nbsp; Correct is the&nbsp; <u>proposed solution 2</u>:
 +
*If &nbsp; $y_\nu = 0$, then only the values&nbsp; $0$&nbsp; and&nbsp; $1$&nbsp; can follow at the next time point,&nbsp; but not&nbsp; $2$, ... , $6$.
 +
*That is: &nbsp; The sequence&nbsp; $ \langle y_\nu \rangle$&nbsp; has (strong) statistical bindings.
 +
 
 +
 
  
:<b>5.</b>&nbsp;&nbsp;Ist <i>y<sub>&nu;</sub></i> = 0, so k&ouml;nnen zum n&auml;chsten Zeitpunkt nur die Werte 0 und 1 folgen, nicht aber 2, ... , 6. Das hei&szlig;t: Die Folge &#9001;<i>y<sub>&nu;</sub></i>&#9002; weist (starke) statistische Bindungen auf &nbsp;&#8658;&nbsp; <u>Lösungsvorschlag 2</u>.
+
'''(6)'''&nbsp; The probability we are looking for is identical to the probability that the new binary symbol is equal to the symbol dropped out of the shift register.&nbsp; It follows that:
 +
:$${\rm Pr} (y_{\nu} = \mu\hspace{0.05cm}| \hspace{0.05cm} y_{\nu-{1}} = \mu) = {\rm Pr}(x_{\nu}= x_{\nu-6}). $$
  
:<b>6.</b>&nbsp;&nbsp;Die gesuchte Wahrscheinlichkeit ist identisch mit der Wahrscheinlichkeit daf&uuml;r, dass das neue Bin&auml;rsymbol gleich dem aus dem Schieberegister herausgefallenen Symbol ist. Daraus folgt:
+
*Since the symbols&nbsp; $x_\nu$&nbsp; are statistically independent of each other,&nbsp; we can also write for this:
:$$\rm Pr (\it y_{\nu} = \mu\hspace{0.05cm}| \hspace{0.05cm} y_{\nu-{\rm 1}} = \mu) = \rm Pr(\it x_{\nu}= x_{\nu-\rm 6}). $$
+
:$${\rm Pr}(x_{\nu} = x_{\nu-6}) = {\rm Pr}\big[(x_{\nu}= 1)\hspace{0.05cm}\cap\hspace{0.05cm}(x_{\nu-6}= 1)\hspace{0.05cm}\cup \hspace{0.05cm}(x_\nu=0)\hspace{0.05cm}\cap\hspace{0.05cm}(x_{\nu-6} =0)\big]= p^{2}+(1- p)^{2}=\rm 0.25^2 + 0.75^2\hspace{0.15cm} \underline{ = 0.625}. $$
  
:Da die Symbole <i>x<sub>&nu;</sub></i> statistisch voneinander unabh&auml;ngig sind, kann hierf&uuml;r auch geschrieben werden:
 
:$$\rm Pr(\it x_{\nu} = x_{\nu-\rm 6}) = \rm Pr\left((x_{\nu}=\rm 1)\hspace{0.05cm}\cap\hspace{0.05cm}(x_{\nu-\rm 6}=\rm 1)\hspace{0.05cm}\cup \hspace{0.05cm}(x_\nu=0)\hspace{0.05cm}\cap\hspace{0.05cm}(x_{\nu-\rm 6} =\rm 0)\right)\\ = \it p^{\rm 2}+(\rm 1-\it p)^{\rm 2}=\rm 0.25^2 + 0.75^2\hspace{0.15cm} \underline{ = 0.625}. $$
 
 
{{ML-Fuß}}
 
{{ML-Fuß}}
  
  
  
[[Category:Aufgaben zu Stochastische Signaltheorie|^2.3 Binomialverteilung^]]
+
[[Category:Theory of Stochastic Signals: Exercises|^2.3 Binomial Distribution^]]

Latest revision as of 14:58, 16 February 2022

Considered random generator

A random number generator outputs a binary random number   $x_\nu$  at each clock time  $(\nu)$ , which can be  $0$  or  $1$ .

  • The value  "1"  occurs with probability  $p = 0.25$ .
  • The individual values  $x_\nu$  are statistically independent of each other.


The binary numbers are stored in a shift register with  $I = 6$  memory cells.

At each clock instant,  the contents of this shift register are shifted one place to the right and the algebraic sum  $y_\nu$  of the shift register contents is formed in each case:

$$y_{\nu}=\sum\limits_{i=0}^{5}x_{\nu-i}=x_{\nu}+x_{\nu-1}+\ \text{...} \ +x_{\nu-5}.$$



Hints:



Questions

1

What values can the sum  $y$  take?  What is the largest possible value?

$y_\max \ = \ $

2

Calculate the probability that  $y$  is greater than  $2$.

${\rm Pr}(y > 2) \ = \ $

3

What is the mean value of the random variable  $y$?

$m_y \ =$

4

Find the standard deviation of the random variable  $y$.

$\sigma_y \ = \ $

5

Are the random numbers  $y_\nu$  statistically independent?  Justify your result.

The random numbers are statistically independent.
The random numbers are statistically dependent.

6

What is the conditional probability that  $y_\nu = \mu$  if  $y_{\nu-1} = \mu$  occured previously?  $(\mu = 0, \ 1, \ \text{...} \ , \ I)$.

${\rm Pr}(y_\nu = \mu \hspace{0.05cm} | \hspace{0.05cm} y_{\nu-1} = \mu ) \ = \ $


Solution

(1)  Each cell can contain a  $0$  or a  $1$ .  Therefore,  the sum can take all integer values between  $0$  ánd  $6$ :

$$y_{\nu}\in\{0,1,\ \text{...} \ ,6\}\hspace{0.3cm}\Rightarrow\hspace{0.3cm} y_{\rm max} \hspace{0.15cm} \underline{= 6}.$$


(2)  There is a binomial distribution.  Therefore,  with  $p = 0.25$:

$${\rm Pr}(y =0)=(1-p)^{\it I}=0.75^6=0.178,$$
$${\rm Pr}(y=1)=\left({ I \atop {1}}\right)\cdot (1-p)^{I-1}\cdot p= \rm 6\cdot 0.75^5\cdot 0.25=0.356,$$
$${\rm Pr}(y=2)=\left({ I \atop { 2}}\right)\cdot (1-p)^{I-2}\cdot p^{\rm 2}= \rm 15\cdot 0.75^4\cdot 0.25^2=0.297,$$
$$\Rightarrow \hspace{0.3cm}{\rm Pr}(y>2)=1-{\rm Pr}(y=0)-{\rm Pr}( y=1)-{\rm Pr}( y=2)\hspace{0.15cm} \underline{=\rm 0.169}.$$


(3)  According to the general equation,  the mean of the binomial distribution is:

$$m_y= I\cdot p\hspace{0.15cm} \underline{=\rm 1.5}.$$


(4)  Accordingly,  for the standard deviation of the binomial distribution:

$$\sigma_y=\sqrt{ I \cdot p \cdot( 1- p)} \hspace{0.15cm} \underline{= \rm 1.061}.$$


(5)  Correct is the  proposed solution 2:

  • If   $y_\nu = 0$, then only the values  $0$  and  $1$  can follow at the next time point,  but not  $2$, ... , $6$.
  • That is:   The sequence  $ \langle y_\nu \rangle$  has (strong) statistical bindings.


(6)  The probability we are looking for is identical to the probability that the new binary symbol is equal to the symbol dropped out of the shift register.  It follows that:

$${\rm Pr} (y_{\nu} = \mu\hspace{0.05cm}| \hspace{0.05cm} y_{\nu-{1}} = \mu) = {\rm Pr}(x_{\nu}= x_{\nu-6}). $$
  • Since the symbols  $x_\nu$  are statistically independent of each other,  we can also write for this:
$${\rm Pr}(x_{\nu} = x_{\nu-6}) = {\rm Pr}\big[(x_{\nu}= 1)\hspace{0.05cm}\cap\hspace{0.05cm}(x_{\nu-6}= 1)\hspace{0.05cm}\cup \hspace{0.05cm}(x_\nu=0)\hspace{0.05cm}\cap\hspace{0.05cm}(x_{\nu-6} =0)\big]= p^{2}+(1- p)^{2}=\rm 0.25^2 + 0.75^2\hspace{0.15cm} \underline{ = 0.625}. $$