기본 콘텐츠로 건너뛰기

라벨이 F_distribution인 게시물 표시

통계관련 함수와 메서드 사전

A B C d E F G H I K L M N O P Q R S T U V W Z A statsmodels.ap.stats.anova_lm(x) statsmodels.formula.api.ols 에 의해 생성되는 모형 즉, 클래스 인스턴스(x)를 인수로 받아 anova를 실행합니다. np.argsort(x, axis=-1, kind=None) 객체 x를 정렬할 경우 각 값에 대응하는 인덱스를 반환합니다. Axis는 기준 축을 지정하기 위한 매개변수로서 정렬의 방향을 조정할 수 있음(-1은 기본값으로 마지막 축) pandas.Series.autocorr(lag=1) lag에 전달한 지연수에 따른 값들 사이의 자기상관을 계산 B scipy.stats.bernoulli(x, p) 베르누이분포에 관련된 통계량을 계산하기 위한 클래스를 생성합니다. x: 랜덤변수 p: 단일 시행에서의 확률 scipy.stats.binom(x, n, p) 이항분포에 관련된 통계량을 계산하기 위한 클래스를 생성합니다. x: 랜덤변수 n: 총 시행횟수 p: 단일 시행에서의 확률 C scipy.stats.chi2.pdf(x, df, loc=0, scale=1) 카이제곱분포의 확률밀도함수를 계산 $$f(x, k) =\frac{1}{2^{\frac{k}{2}−1}Γ(\frac{k}{2})}x^{k−1}\exp\left(−\frac{x^2}{2}\right)$$ x: 확률변수 df: 자유도 pd.concat(objs, axis=0, join=’outer’, …) 두 개이상의 객체를 결합한 새로운 객체를 반환. objs: Series, DataFrame 객체. Axis=0은 행단위 즉, 열 방향으로 결합, Axis=1은 열단위 즉, 행 방향으

F 분포(F distribution)

내용 베타함수 F 분포에서의 수용역과 기각역 F 분포(F distribution) 카이제곱 분포 를 따르는 자유도가 각각 k 1 , k 2 인 두 확률변수 X 1 , X 2 의 비에 대한 분포를 F분포 라고 합니다. 새로운 확률변수 F는 식 1과 같이 계산됩니다. $$\begin{equation}\tag{1} F=\frac{X^2_1/k_1}{X^2_2/k_2} \end{equation}$$ 위 식에서 보는 것과 같이 F 분포를 결정하는 인자는 두 개의 자유도이며 각각을 d 1 , d 2 로 표현하면 F 분포는 다음과 같이 나타냅니다. F ∼ F(d 1 , d 2 ) F분포를 따르는 확률변수 x의 확률밀도함수는 식 2와 같습니다. $$\begin{align}\tag{2}f(x)&=\frac{1}{\text{B}(d_1/2, d_2/2)}\left(\frac{d_1x}{d_1x+d_2}\right)^\frac{d_1}{2} \left(1-\frac{d_1x}{d_1x+d_2}\right)^\frac{d_2}{2} x^{-1}\\ &B:\text{베타함수}\\& x \ge 0 \\ & d_1, d_2: \text{양의 정수} \end{align}$$ 베타함수 감마함수 의 비로 식 3과 같습니다. $$\begin{align}\tag{3}B(x, y)&=\frac{\Gamma(x) \Gamma(y)}{\Gamma(x+y)}\\ &\int^1_0 t^{x-1}(1-t)^{y-1}\, dt \end{align}$$ F 분포의 다양한 통계량은 scipy.stats 모듈의 f() 클래스의 여러 메서드를 사용하여 계산할 수 있으며 대표적으로 확률밀도함수( f.pdf() )를 적용합니다. 그림 1은 분자, 분모 자유도에 따라 F분포의 변화를 나타낸 것입니다. import numpy as np import pandas as pd import matplotlib.pyplot

Gamma , Chi square and F distribution

Contents Gamma Distribution Gamma function Gamma distribution Chi-square distribution F distribution Gamma Distribution Since the probability is the ratio of the target cases to the total number of cases, it is important to calculate the total number of cases in calculating the probability. For discrete variables, the total number of cases is calculated using factorial. In the case of continuous variables, the factorial cannot be calculated directly because random variables are not countable. Instead, an integral expression corresponding to factorial is used, which can be replaced with gamma function . Therefore, the gamma distribution based on the gamma function is a distribution related to the exponential distribution and the normal distribution and is used in various fields. Gamma function The gamma function is expressed as Γ(x) and has the form of a factorial function in the realm of natural numbers, and is defined as Equation 1 for discrete and continuous variabl