기본 콘텐츠로 건너뛰기

라벨이 probability인 게시물 표시

[matplotlib]quiver()함수

R 수학과 통계등의 내장함수들

내용 함수들 수학함수 통계함수 확률함수 문자함수 유용한 함수들 데이터 관리를 위한 함수들과 제어문 함수들 수학함수 수학함수 함수 설명 abs(x) 절대값반환 abs(-4) → 4. sqrt(x) 제곱근, sqrt(25) → 5 &eqiv; 25^(0.5). ceiling(x) x보다 작지않은 가장 작은 정수 ceiling(3.21) → 4 floor(x) x보다 크지않은 가장 큰 정수 floor(3.21) → 3 trunc(x) x의 값 중 숫점 이하의 값을 버림으로서 형성된 정수 trunc(3.21) → 3 round(x, digits=n) x의 지정한 자릿수+1 에서 반올림 round(3.475, digits=2) → 3.48. signif(x, digits=n ) x를 지정된 유효 자릿수로 반올림 signif(3.475, digits=2) → 3.5. cos(x) , sin(x) , tan(x) Cosine, sine, and tangent cos(2) → -0.416. acos(x) , asin(x) , atan(x) 삼각함수의 역함수, arc-cosine, arc-sine, and arc-tangent acos(-0.416) → 2. cosh(x) , sinh(x) , tanh(x) 쌍곡선 함수인 hyperbolic cosine, sine, and tangent sinh(2) → 3.627. acosh(x) , asinh(x) , atanh(x) Hyperbolic arc-cosine, arc-sine, and arc-tangent asinh(3.627) → 2. log(x, base=n) 밑...

Probability Inequalities & Moment Generating Functions

Contents Probability Inequalities Markov's inequality Chebyshev's inequality Moment generating function Combination of random variables Probability Inequalities & Moment Generating Functions It is necessary to know the interval of probabilities that contains the value(s) of interest in a distribution that can be estimated as a statistic. In addition, it is necessary to establish a confidence interval indicating the degree of confidence in the results of statistical analysis. Markov and Chebyshev inequalities are mathematical expressions underlying the rationale for establishing probability intervals or confidence intervals. Probability Inequalities Markov's inequality If X is a random variable and g(x) is a nonnegative real-valued function, then Equation 1 holds for any positive real c. $$\begin{equation} \tag{1} p[g(x) \ge c] \le \frac{E[g(x)]}{c} \end{equation}$$ If the event of this variable is $A=\{x|g(x) \ge c\}$, the above expression is proved...

Probability and Expected Value

Contents Probability and Expected Value Expected value Linear combination of expected values Probability and Expected Value A quantitative indicator for mathematically describing the characteristics and shape of random variables and probability distributions is called moment . $$\begin{aligned}&\text{nth order moment }= E(x^n)\\ &n= 1, 2, \cdots \end{aligned}$$ Moments are used to derive various statistics such as skewness and kurtosis along with mean and variance introduced in descriptive statistics. Expected value The mean is the most commonly used statistic to characterize variables. This statistic is calculated as the product of the frequency and probability for each variable value and is called expected value (E(X)). Each value of the random variable X can be specified by the relative likelihood, that is, the probability function, which is the probability that the value can appear compared to other values. When the v...

Permutation & Combination

Contents Probability Permutation & Combination Probability Probability is a measure of belief about an event that will occur in the future, based on historical data. In other words, the probability of occurrence of a specific target event among the total from past data can be defined as probability. Probability has the following axiom: Probability axiom A value between 0 and 1 $$ 0 \,\le\, P(x) \,\le\, 1$$ The sum of all probability is 1 $$\begin{align}&\sum_{x \in S} P(x) =1\\ & S=\text{all possible spaces} \end{align} $$ A: Event(s) included in S $$A \subset S, P(X \in A) = \sum_{x \in A}P(X=x)$$ The concept of the probability that a particular event will occur in an experiment can be applied and interpreted in many ways. For example, for a forecast that there is a 70% chance of rain tomorrow, you can analyze the data of past climatic conditions and interpret it as a result of 70% rain under conditio...

[Probability]순열(permutation)

순열(Permutaion) 경우의 수 주사위 2개를 시행할 경우 발생되는 모든 경우는 다음과 같습니다. event=[] for i in range(1, 7): for j in range(1, 7): event.append((i, j)) print(event, end="") [(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)] (1, 1) (1, 2) (1, 3) (1, 4) (1, 5) (1, 6) (2, 1) (2, 2) (2, 3) (2, 4) (2, 5) (2, 6) (3, 1) (3, 2) (3, 3) (3, 4) (3, 5) (3, 6) (4, 1) (4, 2) (4, 3) (4, 4) (4, 5) (4, 6) (5, 1) (5, 2) (5, 3) (5, 4) (5, 5) (5, 6) (6, 1) (6, 2) (6, 3) (6, 4) (6, 5) ...

집합 자료형과 집합연산_python

python에서는 set이라는 집합 자료형을 제공합니다. 이 자료형은 집합들 간의 합집합 등의 연산을 위해 사용되는 형태입니다. 이번 글에서는 python 의 set 자료형에 의한 연산 종류를 알아봅니다. 우선 리스트등의 자료형을 집합형으로 전환하기위해서 set() 함수를 사용합니다. 다음은 주사위 두개를 던져 나올수 있는 모든 경우입니다. >>> S=[(i, j) for i in range(1, 7) for j in range(1, 7)] >>> print(S) [(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), (3, 6), (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), (4, 6), (5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6), (6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)] 다음 A와 B는 각각 두수의 합이 2의 배수, 3의 배수인 경우입니다. >>> A=[(S[i][0], S[i][1]) for i in range(len(S)) if (S[i][0]+S[i][1])%2 ==0] >>> print(A) [(1, 1), (1, 3), (1, 5), (2, 2), (2, 4), (2, 6), (3, 1), (3, 3), (3, 5), (4, 2), (4, 4), (4, 6), (5, 1), (5, 3), (5, 5), (6, 2), (6, 4), (6, 6)] >>> B=[(S[i][0], S[i][1]) for i in range(len(S)) if (S[i][0]+S[i][1])%3 ==0] >>> print(B) [(1, 2), (1, ...