Würfelaufgabe stochastik Mathe?


15.10.2023, 13:45

Und wie funktioniert die c) die verstehe ich überhaupt nicht

1 Antwort

zu (18b):

Augensumme 3: 1&2 2&1 also (1/6)*(3/6)+(3/6)*(1/6)=6/36

Oder: 6&6 also (1/3)*(1/3)=1/9=4/36

Beides zusammen gibt 10/36 oder 5/18

das bedeutet also eine Gewinnerwartung von 3€*5/18-1€=-(0,1+1/15)€ also schlecht für den Spieler...

zu (18aF):

alsoist nicht Omega, weil „die 6 fällt dreimal“ nicht enthalten ist, nur 0-mal,1-mal und 2-mal... stimmt's?

zu (18c):

die WK für „2“ ist 0,5... also ist die Gewinnerwartung:also für a=4 kommt Null raus... oder?

Woher ich das weiß:Studium / Ausbildung – Absolvent/Universität
LUKEars  18.10.2023, 04:20

mit Monte-Carlo-Simulation:

#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <inttypes.h>

void A() {
  const uint32_t C = 100*1000*1000;
  uint32_t G = 0;
  double win = 0;
  const double a = 4;
  const uint8_t J = 10;
  for (uint32_t l=C/J; l>0; l--) {
    uint32_t R = random();
    for (uint8_t j=J; j>0; j--, G++, win-=6)
      for (uint8_t i=3; i>0; i--, R>>=1)
        if (R&1) win += a;
  }
  printf("games:%u won:%.2f€/game@a=%.2f€\n",G,win/G,a);
}

int main(int argc, char ** argv) {
  unsigned seed; read(0,&seed,sizeof(seed)); srandom(seed);
  A();
  return 0;
}

kommt das da raus:

> c++ -o a a.c -O3 && time (dd if=/dev/urandom bs=4 count=1|./a)
1+0 records in
1+0 records out
4 bytes copied, 6.4798e-05 s, 61.7 kB/s
games:100000000 won:0.00€/game@a=4.00€
real    0m1.981s
user    0m1.966s
sys    0m0.005s
0