Respuesta aceptada

Jeff Miller
Jeff Miller el 24 de Nov. de 2020

0 votos

  1. Generate a cab of one color or the other with the appropriate probabilities.
  2. Get the color ID response from the witness with the appropriate probability.
  3. Record the actual cab color and the color ID response.
Iterate steps 1-3 10,000 times.
From the 10,000 iterations, select all the ones where the color ID response was blue. Say there are N of these.
Find out what proportion of those N times the actual cab color was blue.

3 comentarios

George Rooney
George Rooney el 25 de Nov. de 2020
Thanks. I was planning to brute force it in Excel by choosing random number from 1 to 85 representing green and 86 to 100 being blue...then choosing a subsequent random number between 1 and 80 (for correct), and 81 to 100 for incorrect...tally all blues+correct divided by all blues (correct and incorrect)...is that what you are suggesting, something along those lines? Does Matlab allow me to do this in a straightforward way?
Thanks,
George
Jeff Miller
Jeff Miller el 25 de Nov. de 2020
Hi George, Yes, what you are describing sounds like a version of what I am suggesting. To make it more like what I think of as a "simulation", I would convert the initial 1-85 versus 86-100 into blue versus green, and then 1-80 // 81-100 into correct/incorrect, but that is just semantics.
Yes, it is straightforward to do all this in matlab. For starters, randi(100,10000,2) will give you 10,000 rows and two columns of numbers 1-100.
George Rooney
George Rooney el 25 de Nov. de 2020
Thanks very much. I will give it a try.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Preguntada:

el 24 de Nov. de 2020

Comentada:

el 25 de Nov. de 2020

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by