Metódy riešenia úloh z pravdepodobnosti a štatistiky
A high school student who hadn’t opened his American history book in weeks was dismayed to walk into class and be greeted with a pop quiz. It was in the form of two lists, one naming the 24 presidents in office during the 19th century in alphabetical order and another list noting their terms in office, but scrambled. The object was to match the presidents with their terms. The completely clueless student had to guess every time. On average, how many did he guess correctly?
Uvažujme balíček kariet, pričom karty 2-10 majú svoje číselné hodnoty, J - 11, Q - 12, K - 13, A - 1. Karty sú zamiešané.
Náhodne vyberieme tri karty. Aká je pravdepodobnosť, že ich hodnoty nebudú všetky rôzne?
Tom a Jerry si náhodne vyberú po jednej karte. Aká je pravdepodobnosť, že Jerryho karta bude mať vyššiu hodnotu?
Zadanie:
Write an R code to simulate the following scenario: Draw 3 cards from a deck of 52 cards (no jokers). Observe the value of the 3 cards, then replace the card with the lowest value with another card in the deck. What sum of the values of the 3 cards? Assume the value of a jack is 11, a queen 12, a king 13 and an ace 1.
Vo videu si budeme všímať:
Dajú sa vymyslieť aj iné implementácie - na obrázku si ukážeme porovnanie časov.