- meinachuan 的博客
Math Expectations
- 2024-12-22 11:42:33 @
:
$$(a+b)^r=a^r+(C_r^1)a^{n-1}b^1+(C_r^2)a^{n-2}b^2+(C_r^3)a^{n-3}b^{3}+\dots+(C_r^{n-2})a^2b^{n-2}+(C_r^{n-1})a^1b^{n-1} $$:
: "" 个
: "" 个
$\text {At a round table, there are four people seated, and if in both seating arrangements, everyone's left and right neighbors are the same, how many ways are there to think the same?}$
:
#include <iostream>
#include <bitset>
using namespace std;
int main() {
int s = 9;
for (int i = s; ; i = (i - 1) & s) { // s is a set.
cout << bitset<8>(i);
if (i == 0) {
break;
}
}
}
/*
a subset of 9:
1001
0001
1000
0000 *
*/
:
:
#include <iostream>
#include <bitset>
using namespace std;
int main()
{
int sum = 0;
int n = 5;
for (int s = 0; s < (1 << n); s++) {
for (int i = s; ; i = (i - 1) & s) {
cout << bitset<8>(i) << '\n';
sum++;
if (i == 0) {
break;
}
}
}
cout << sum << '\n';
return 0;
}
1 1
1 2 1
1 3 3 1
1 4 6 4 1
...
$\text {Let m, n, and r, be nonnegative integers with r not ex-ceeding either m or b. Then}$
$\text {COROLLARY If n is a nonnegative integer. Then}$:
$\text {THEOREM Let n and r be nonnegative integer with } r\leqslant n \text {. Then}$
$\text{A probabilistic form of the repulsion principle}$:
$$P(A\cup B)=P(A)+P(B)-P(A\cap B) P(A\cup B\cup C)=P(A)+P(B)+P(C)-P(A\cap B)-P(B\cap C)-P(A\cap C)+P(A\cap B \cap C) $$$$P(A)=1-P(\overline A) \\ P(\phi)=0 \\ \text {If } A \subset B, \text {So} P(A)\leqslant P(B) \\ \text {To any event: } 0\leqslant P(A)\leqslant 1 $$
:
$$\text {Probability} (\%)=\frac {\text{Number of valid scenarios}}{\text{Total number of scenarios}} $$
:
$\text {Defined as: a weighted average weighted by probability (or density).}$
$\text{There are 4 red balls and 6 black balls in the bag, which are now placed in the bag Return to the ground to take the ball 3 times in turn, and find the probability of getting the black ball for the first 2 times and the red ball for the 3rd time.}$
- $\text {Limited sample space: The number of sample points is limited.}$
- $\text{Each basic event has the same probability of occurring.}$
- $\text{Ideally, the probability of any one side facing up is equal when a die is rolled.}$
- .
$\text{At 0 moments, two people are waiting for the bus, car A arrives with a probability of arriving at the first 60 minutes, and car B arrives with an equal probability of arriving at the first 120 minutes. Ask about the probability that car A will arrive before car B.}$
$\text {Let the random variable } X \text {have the pmf}$
$\text{where } S_x={-1,0,1}\text{ Let } u(X)=X^2\text{. Then}$
$$E(X^2)=\sum_{x\in S_x}x^2f(x)=(-1)^2(\frac{1}{3}) + (0)^2(\frac{1}{3})+(1)^2(\frac{1}{3})=\frac{2}{3} $$$$\sum{(a_i+b_i)}=\sum{a_i}+\sum{b_i} \\ \sum{(a_i-b_i)}=\sum{a_i}-\sum{b_i} $$
$$\sum_{cyc}{a}=\sum_{cyc}{b}=\sum_{cyc}{c}=a+b+c \\ \sum_{cyc}ab=\sum_{cyc}bc=\sum_{cyc}{ca}=ab+bc+ca \\ \sum_{cyc}a^2b=\sum_{cyc}b^2c=\sum_{cyc}c^2b=a^2b+b^2c+c^2a $$