【问题标题】:Statistical tests for two random datasets两个随机数据集的统计检验
【发布时间】:2021-08-05 15:59:39
【问题描述】:

我需要比较两个数据集,我在 Julia 中随机创建了它们,rand。我想知道是否有一些统计测试(可以在 Julia JuMP 中执行)告诉我分布有多么不同(不假设原始分布)。

【问题讨论】:

    标签: statistics julia julia-jump statistical-test


    【解决方案1】:

    为什么要在 JuMP 中执行此操作?

    这确实是 HypothesisTests 包的工作: https://github.com/JuliaStats/HypothesisTests.jl

    julia> using HypothesisTests
    
    julia> x, y = rand(100), rand(100);
    
    julia> test = HypothesisTests.ApproximateTwoSampleKSTest(x, y)
    Approximate two sample Kolmogorov-Smirnov test
    ----------------------------------------------
    Population details:
        parameter of interest:   Supremum of CDF differences
        value under h_0:         0.0
        point estimate:          0.11
    
    Test summary:
        outcome with 95% confidence: fail to reject h_0
        two-sided p-value:           0.5806
    
    Details:
        number of observations:   [100,100]
        KS-statistic:              0.7778174593052022
    
    
    julia> pvalue(test)
    0.5806177304235198
    

    https://juliastats.org/HypothesisTests.jl/stable/nonparametric/#HypothesisTests.ApproximateTwoSampleKSTest

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-09-23
      • 1970-01-01
      • 2015-08-31
      相关资源
      最近更新 更多