TU Wien:Statistik und Wahrscheinlichkeitstheorie UE (Levajkovic)/Übungen 2023W/HW02.1

Aus VoWi
Zur Navigation springen Zur Suche springen
Winnings

A box contains 5 red and 9 blue marbles. Two marbles are withdrawn randomly. If the two marbles are of the same color, then you win 2 Euro and if they are of different colors then you

lose 1.2 Euro. Compute the expected value and the variance of the amount you win.

Dieses Beispiel ist als solved markiert. Ist dies falsch oder ungenau? Aktualisiere den Lösungsstatus (Details: Vorlage:Beispiel)


Lösungsvorschlag von Lessi[Bearbeiten | Quelltext bearbeiten]

--Lessi 2024-02-07T13:04:11Z

The possible outcomes are so we can define a variable

A <- 5 / 14 * 4 / 13 + 9 / 14 * 8 / 13 # probability of getting same color
A 

B <- 2 * 5 / 14 * 9 / 13 # probability of getting different colors
B

Now lets define the pmf

so that the expected value can be computed:

exp <- 2 * A - 1.2 * B
exp

Finally determine the variance :

var <- 4 * A + 1.44 * B - exp^2
var