기본 콘텐츠로 건너뛰기

라벨이 statistics인 게시물 표시

[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) 밑...

Evaluation of regression coefficients, model & Estimation

Contents Evaluation of regression coefficients Evaluation of the model Regression Estimation Evaluation of regression coefficients T tests in regression analysis tests for the following null hypothesis (H0) for the regression coefficients of the generated model: H0: No significant difference by coefficient These results indicate that the test statistic, t, is outside the confidence interval and that the p-value is also close to zero, which is much lower than the significance level. Therefore, the results for the above dollor index indicate that the null hypothesis cannot be adopted. This discussion can be generalized as follows: The calculated regression coefficients also form a distribution as probability variables, so you can conduct a test. As mentioned above, the distribution has the same shape as the distribution of errors, so you can calculate the variance of the regression coefficient based on the variance of the error. As shown in Equation 1, the regression...

Autocorrelation & Mean of Square Error

Contents Autocorrelation analysis Mean of Square Error Residual(Error) The generated regression model needs to be statistically tested, and the main object in the test is an error, the difference between the observations and estimates calculated by Equation 1. $$\begin{align}\tag{1}\text{e}&=y-(b_0+b_1x)\\&=y-\hat{y} \end{align}$$ Errors in the regression model have the following prerequisites: Probability variables that follow a normal distribution Because independent variables are probabilities that follow a normal distribution, the error between the response and the estimate is also a probability variable that follows a normal distribution. This means that the error cannot be artificially adjusted. Homoscedastic of error terms Various regression models are possible, as shown in Figure 1. This means that you can configure the probability distribution for the regression coefficients. This distribution has means and variances. The mean of this distrib...

Regression Analysis: simple regression & regression coefficient

Contents What is Regression? Simple regression Regression Coefficient What is Regression? Regression is a statistical method of setting up a model for the relationship between variables and estimating new values through that model. Figure 1 is a graph of the force (y) corresponding to a constant height (x), showing the exact direct proportional relationship in which y increases as x increases. This relationship is based on data from generalized laws of physics, which can fully predict the forces applied at a certain height within the Earth where gravity acts. plt.figure(figsize=(7,5)) h=range(7) w=40 F=[w*9.8*i for i in h] plt.plot(h, F, "o-") plt.xlabel("Height(m)", size=13, weight="bold") plt.ylabel("Force(N)", size=13, weight="bold") plt.text(2.5, 1500, 'F=Wgh', color="blue", size=13, weight="bold") plt.text(2, -600, r'w:weight (kg), g: Gravity Acceleration($m/sec^2$)', color="...

Analysis of variance

Contents ANOVA Two-Way ANOVA Analysis of variance Analysis of variance(ANOVA) is a statistical method that tests the null hypothesis that all groups have the same mean by comparing the variation within and between groups in two or more groups. The tests for two groups have applied a normal or t distribution, but to compare more groups, use an F distribution that compares the degree of variability between groups. The data for ANOVA consist of the nominal variables ( factors ) that are being compared and the values for each factor, i.e., response variable. Each factor can be classified into several sub-groups and the factors in this group are called treatment (factor levels. The analysis of a single response corresponding to the factor level is called one-way ANOVA A} (anova), or multiple responses are called manova Multivariate analysis is beyond the scope of this book, but one-way and two-way variance analysis can be the foundation for that analysis. The null hyp...

Comparison of two independent groups

Contents Equal Variances in Small Sampless> Different Variances in Small Samples Large sample Comparison of two independent groups The means of two independent probability variables, X and Y, each of which follows a normal distribution, can be compared by applying a hypothesis test: $$\begin{align}\bar{X}&=\frac{\sum^n_{i=1} X_i}{n_X} \sim N\left(\mu_X, \frac{\text{s}_X}{n_X}\right)\\ \bar{Y}&=\frac{\sum^n_{i=1} Y_i}{n_Y} \sim N\left(\mu_Y, \frac{\text{s}_Y}{n_Y}\right)\end{align}$$ Even if each sample group does not assume a normal distribution, approximately normal distribution is satisfied according to the central limit theorem . To compare the two groups, set the following null hypothesis for the difference between each mean: $$\text{H0} : \mu_X -\mu_Y =0$$ The hypothetical test statistics are calculated from a combined distribution of two groups. That is, the mean and standard deviation of the combined probability distributions of X and Y are calculated as...