diff --git a/is/UB1/ISUB1.pdf b/is/UB1/ISUB1.pdf new file mode 100644 index 0000000..68365db --- /dev/null +++ b/is/UB1/ISUB1.pdf Binary files differ diff --git a/is/UB1/ISUB1.tex b/is/UB1/ISUB1.tex index 73878a2..a2c0cc0 100644 --- a/is/UB1/ISUB1.tex +++ b/is/UB1/ISUB1.tex @@ -8,6 +8,7 @@ \usepackage{ifthen} %ifthenelse \usepackage{enumerate} +\usepackage{color} \usepackage{algpseudocode} %Pseudocode \usepackage{dsfont} % schöne Zahlenräumezeichen \usepackage{amssymb, amsthm} %noch stärker erweiterte Mathe-Zeichen @@ -71,8 +72,11 @@ \newcommand{\Aufgabe}[2]{\stepcounter{n} \textbf{Exercise \arabic{n}: #1} (#2 Points)\\} - - +\newcommand{\textcorr}[1]{\textcolor{red}{#1}} +\newenvironment{corr}{\color{red}}{\color{black}\newline} +\newcommand{\ok}{\begin{corr} + $\checkmark$ + \end{corr}} \begin{document} %\header{BlattNr}{Tutor}{Abgabedatum}{Vorlesungsname}{Namen}{Semester}{Anzahl Aufgaben} @@ -80,51 +84,65 @@ }{SS 15}{4} \vspace{1cm} \Aufgabe{Python}{4} - done\\ + done\\\ok \Aufgabe{Poker}{2+2+4=8} \begin{enumerate}[1.] \item possible hands: ${52 \choose 5}=2598960$\\ hands with exaclty one pair: ${13\choose 1}\cdot{4\choose 2}\cdot {12\choose 3}\cdot 4^3=1098240$\\ - $\mathds{P}(1\ pair)=\frac{1098240}{2598960}=\frac{352}{833}\approx 0.423$ + $\mathds{P}(1\ pair)=\frac{1098240}{2598960}=\frac{352}{833}\approx 0.423$\ok \item hands with exaclty two pairs: ${13\choose 2}{4\choose 2}^2\cdot 11\cdot 4=123552$\\ - $\mathds{P}(2\ pairs)=\frac{123552}{2598960}=\frac{198}{4165}\approx 0.0475$ + $\mathds{P}(2\ pairs)=\frac{123552}{2598960}=\frac{198}{4165}\approx 0.0475$\ok \item \begin{enumerate}[(a)] \item possible hands without Spades: ${39\choose 5}=575757$\\ hands with exaclty two pairs without Spades: ${13\choose 2}{3\choose 2}^2\cdot 11\cdot 3=23166$\\ - $\mathds{P}(2\ pairs|\neg Spades)=\frac{23166}{575757}=\frac{198}{4921}\approx 0.0402$\\ + $\mathds{P}(2\ pairs|\neg Spades)=\frac{23166}{575757}=\frac{198}{4921}\approx 0.0402$\ok\\ one pair:\\ ${13\choose 1}{3\choose 2}{12 \choose 3}\cdot 3^3=231660$\\ - $\mathds{P}(1\ pair|\neg Spades)=\frac{231660}{575757}=\frac{1980}{4921}\approx 0.402$ + $\mathds{P}(1\ pair|\neg Spades)=\frac{231660}{575757}=\frac{1980}{4921}\approx 0.402$\ok \item \begin{enumerate}[(i)] \item $A:=1\ pair,\ B:=\neg Spades$\\ $P(A|B)=\frac{P(B|A)P(A)}{P(B)}$\\ $P(A)=\frac{352}{833},\ P(B)=\frac{39}{52}\cdot\frac{38}{51}\cdot\frac{37}{50}\cdot\frac{36}{49}\cdot\frac{35}{48}=\frac{2109}{9520}$\\ - $P(B|A)=1-P(\neg B| A)=1-\left(\frac{1}{4}+\frac{3}{4}\cdot\frac{1}{4}+\left(\frac{3}{4}\right)^2\frac{1}{4}+\left(\frac{3}{4}\right)^3\frac{1}{4}+\left(\frac{3}{4}\right)^4\frac{1}{3}\right)=1-\frac{101}{128}=\frac{27}{128}\approx 0.211$\\ - $P(A|B)=\frac{\frac{27}{128}\cdot \frac{352}{833}}{\frac{2109}{9520}}=\frac{1980}{4921}\approx 0.402$ + $P(B|A)=1-P(\neg B| A)=1-\left(\frac{1}{4}+\frac{3}{4}\cdot\frac{1}{4}+\left(\frac{3}{4}\right)^2\frac{1}{4}+\left(\frac{3}{4}\right)^3\frac{1}{4}+\left(\frac{3}{4}\right)^4\frac{1}{3}\right)=1-\frac{101}{128}=\frac{27}{128}\approx 0.211$\\\begin{corr} + easier approach: $P(B|A)=\frac{\#\{1\ pair,\ no Spades\}}{\#\{1\ pair\}}$ + \end{corr} + $P(A|B)=\frac{\frac{27}{128}\cdot \frac{352}{833}}{\frac{2109}{9520}}=\frac{1980}{4921}\approx 0.402$\ok \item $A:=2\ pairs,\ P(A)=\frac{198}{4165}$, B as above\\ $P(B|A)=1-\left(\frac{1}{4}+\frac{3}{4}\cdot\frac{1}{4}+\left(\frac{3}{4}\right)^2\cdot\frac{1}{4}+\left(\frac{3}{4}\right)^3\cdot\frac{1}{3}+\left(\frac{3}{4}\right)^3\frac{2}{3}\cdot\frac{1}{3}\right)=\frac{3}{16}$\\ - $P(A|B)=\frac{\frac{3}{16}\cdot \frac{198}{4165}}{\frac{2109}{9520}}=\frac{198}{4921}\approx0.0402$ + $P(A|B)=\frac{\frac{3}{16}\cdot \frac{198}{4165}}{\frac{2109}{9520}}=\frac{198}{4921}\approx0.0402$\ok \end{enumerate} \end{enumerate} \end{enumerate} -\pagebreak \Aufgabe{Random Variables}{2+2+2=6} \begin{enumerate} - \item $F\left(\frac{3}{2}\right)-F\left(\frac{1}{2}\right)=\frac{3}{4}-\frac{1}{4}=\frac{1}{2}$ + \item $F\left(\frac{3}{2}\right)-F\left(\frac{1}{2}\right)=\frac{3}{4}-\frac{1}{4}=\frac{1}{2}$\ok \item $x^24 + \end{cases}\\ + F_Y(y)=\begin{cases} + 0 & y<0\\ + \frac{1}{2}\sqrt{y} & 0\le y\le 4\\ + 1 & y>4 + \end{cases}$ + \end{corr} \item $ F_z(z) = F_x(g^{-1}(z))\\ g(X)=\sqrt{X} \\ g^{-1}(z)= z^2\\ - F_z(z)= \frac{1}{2} z^2\\ + F_z(z)= \frac{1}{2} z^2\textcorr{\text{, where }0\sqrt2 - \end{cases}$ + \end{cases}$\ok \\ reference: http://math.arizona.edu/$\sim$jwatkins/f-transform.pdf - \end{enumerate} + \end{enumerate}\pagebreak \Aufgabe{Keep Rolling!}{4} \begin{align*} \mathds{E}(X) @@ -135,6 +153,16 @@ &=p\cdot \frac{1}{p^2}\\ &=\frac{1}{p} \end{align*} - $\Rightarrow\mathds{E}(X)=\frac{1}{p}=\frac{1}{\frac{1}{6}}=6$ + $\Rightarrow\mathds{E}(X)=\frac{1}{p}=\frac{1}{\frac{1}{6}}=6$\ok + \begin{corr} + other approach:\\ + $X=\#$ needed to throw dice\\ + $T=$ if we have 6$\rightarrow\begin{cases} + 0\\1 + \end{cases}\\ + \mathds{E}(X|T=1)=1\\ + \mathds{E}(X|T=0)=\sum\limits_{k=1}^\infty p(x=k|T=0)=\mathds{E}(X+1)\\ + \mathds{E}(X)=\frac{1}{6}+\frac{5}{6}\left(\mathds{E}(X+1)\right)=\frac{1}{6}+\frac{5}{6}\mathds{E}(X)+\frac{5}{6}$ + \end{corr} \end{document}