Mathematical modeling --- Use tools for descriptive statistics

Simple statistics

matlab

Insert picture description here

Excel

Insert picture description here

SPSS

Insert picture description here

Correlation coefficient

Spearman correlation coefficient

Mathematical Modeling-Spearman Correlation Coefficient

Pearson correlation coefficient

Mathematical modeling-Pearson correlation coefficient

Stata makes probability density estimation graph and saves the picture

// 做x的概率密度估计图
kdensity x

Insert picture description here

//保存图片
graph export a.png ,replace

Stata's descriptive statistics on data

Quantitative data

summarize  变量1 变量2 ... 变量n

Insert picture description here

  • If you put it in the paper, you need to put it in Excel first to become a three-line table, and then put the three-line table in the paper
summarize 变量 ,d

Insert picture description here

  • Percentiles
    said that the data corresponding to the variables are sorted from small to large, and then output in 1%, 5%,..., 99% 1\%,5\%, ..., 99\%1%,5%,...,9 9 % corresponds to the value of the variable — look at itIs the data distribution uniform
    Insert picture description here

Qualitative data

// 得到出现的次数(Freq)
tabulate 变量
  • This function only analyzes one variable at a time

Insert picture description here

tab 变量 ,gen(A)
  • Generate dummy variables A 1...A n A1...AnA1...An

Insert picture description here

  • For example, in the figure, there are two recipes, there are two dummy variables A 1, A 2 A1, A2A 1 ,
    When A 2 is the first formula,A 1 = = 1; A 2 = = 0 A1 == 1; A2==0A 1==1;A 2==0
    When it is the second formula,A 1 = = 0; A 2 = = 1 A1 == 0; A2==1A 1==0;A 2==1
Excel draws frequency fan chart of variables
  1. Insert -> PivotTable
  2. Select the desired field
    Insert picture description here
    You can choose how the value is displayed (number or percentage)
  3. Draw a fan chart
    analysis -> data perspective chart
    Insert picture description here
  • Add numbers to the picture
    Insert picture description here

  • In order to make the drawn pictures have a sense of beauty,
    you can sort them before you start drawing -> Sort
    Color can be changed: Page Layout -> Color

Visualize data-data bars

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_43779658/article/details/108057541