Ну наверно надо написать решение последней #zoda4a (условия...

Ну наверно надо написать решение последней #zoda4a

(условия и решившие её самостоятельно тут vk.com/wall14_65916)

Вероятность — это отношение успешных исходов ко всему числу возможных вариантов.

Всего комбинаций из 4 цифр (каждая может принимать значения от 0 до 9) 10*10*10*10=10000

теперь надо определить число успешных исходов. Тут я был не очень корректен и написал там две одинаковые, а не только две. То есть, если подходить к прочтению условия формально, то и две, и три, и четыре одинаковые цифры подходят.

то есть, успешными исходами считаются все, где есть хотя бы две одинаковые цифры. количество таких исходов проще всего посчитать вычитанием из общего числа исходов числа исходов, где все цифры разные. (потому что число исходов, где все цифры разные посчитать нетрудно)

на первом месте может стоять каждая из 10 цифр, тогда на втором только любая из 9 оставшихся(чтобы не повторялись), на третьем 8 и на последнем 7 10*9*8*7=5040.

Тогда число удачных исходов 10000-5040=4960, а вероятность такого события (есть хотя бы две одинаковые цифры) 4960/10000=0.496 или 49.6 %

Если же решать задачу в постановке "ровно две" одинаковых цифры, то посчитать успешные исходы будет чуть сложнее.

всего две одинаковые цифры могут оказаться вот в таких местах пин кода

XXYZ YXXZ YZXX XYXZ YXZX XYZX

это шесть вариантов.

одинаковые цифры могут быть любые - это 10

третья цифра должна отличаться - выбираем из оставшихся 9

а четвертая должна отличаться и от пары, и от третьей — выбираем из 8

6*10*9*8=4320 успешных исходов.

тогда вероятность будет 4320/10000=0.432 или 43.2%

Что не так и мало.

Сравним с экспериментальными данными. Разделим число пар в пинкодах на общее число пинкодов.

в голосовании были следующие варианты

- одна карта и там есть пара — считаем и в число пар, и в число пинкодов
- одна карта и там нет пары — считаем только в число пинкодов

- несколько карт и там во всех пары — считаем за 2 пары и за 2 пинкода

- несколько карт и там хотя бы одна пара — считаем за 1 пару и за 2 пинкода

- несколько карт и там нет пар — считаем только 2 пинкода

2 - это грубо, но сойдет, если карт больше, полученный результат будет немного завышен.

число пар: 23+32+24=79

число пин-кодов: 23+25+64+24+34=170

79/170=0,4647 или 46.5%

что очень недалеко от теоретической оценки =)

Эксперимент прошёл успешно!
Well, you probably need to write a solution to the last # zoda4a

(conditions and decide it yourself here vk.com/wall14_65916)

Probability is the ratio of successful outcomes to the entire number of possible options.

Total combinations of 4 digits (each can take values ​​from 0 to 9) 10 * 10 * 10 * 10 = 10000

now it is necessary to determine the number of successful outcomes. Here I was not very correct and wrote two identical ones there, and not just two. That is, if we approach the reading of the terms formally, then two, and three, and four identical numbers are suitable.

that is, all are considered successful outcomes where there are at least two identical numbers. The number of such outcomes is easiest to calculate by subtracting from the total number of outcomes the number of outcomes, where all the numbers are different. (because the number of outcomes, where all the numbers are different to count is not difficult)

in the first place each of 10 digits can be, then in the second only any of the 9 remaining (not to repeat), on the third 8 and on the last 7 10 * 9 * 8 * 7 = 5040

Then the number of successful outcomes is 10000-5040 = 4960, and the probability of such an event (there are at least two identical numbers) 4960/10000 = 0.496 or 49.6%

If, however, to solve the problem in the formulation of "exactly two" identical figures, then it will be slightly more difficult to calculate the successful outcomes.

just two identical numbers may be in such places pin code

XXYZ YXXZ YZXX XYXZ YXZX XYZX

These are six options.

the same numbers can be any - it's 10

the third digit should be different - choose from the remaining 9

and the fourth should be different from the pair, and from the third - choose from 8

6 * 10 * 9 * 8 = 4320 successful outcomes.

then the probability will be 4320/10000 = 0.432 or 43.2%

What is not so little.

Compare with experimental data. Divide the number of pairs in the pincode on the total number of pincode.

In the voting were the following options

- one card and there is a pair - we count both the number of pairs and the number of pincodes
- one card and there is no pair - we count only in the number of pincodes

- several cards and there in all pairs - count for 2 pairs and for 2 pin codes

- several cards and at least one pair there - we count as 1 pair and 2 points

- several cards and there are no pairs - we count only 2 pin codes

2 - this is rough, but will come down, if there are more cards, the result will be a bit overpriced.

number of pairs: 23 + 32 + 24 = 79

number of pin codes: 23 + 25 + 64 + 24 + 34 = 170

79/170 = 0.4647 or 46.5%

which is very close to the theoretical estimate =)

The experiment was successful!
У записи 17 лайков,
0 репостов.
Эту запись оставил(а) на своей стене Андрей Городецкий

Понравилось следующим людям