【问题标题】:How to draw Beta distribution curves in R?如何在R中绘制Beta分布曲线?
【发布时间】:2021-02-01 23:10:14
【问题描述】:

我需要在 R 中创建这个图表

但我不喜欢看起来像here

【问题讨论】:

    标签: r


    【解决方案1】:

    这个怎么样:

    c2 <- curve(dbeta(x, 3,1))
    plot(curve(dbeta(x, 91, 11)), col="red", type="l", xlab="x", ylab="Beta Density")
    lines(c2$x, c2$y, col="blue")
    legend("topleft", 
           c("Beta(91,11)", "Beta(3,1)"), 
           inset=.01, 
           lty=c(1,1), 
           col=c("red", "blue"))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-01-20
      • 2012-03-02
      • 2014-03-19
      • 2021-07-05
      • 2015-09-25
      • 2016-11-29
      相关资源
      最近更新 更多