Questions tagged [beta-distribution]

A two-parameter family of univariate distributions defined on the interval [0,1].

The "Beta distribution" is a two-parameter family of univariate distributions defined on the interval [0,1]. The probability density function of the distribution is:

enter image description here

with positive parameters α and β.

A common use of the distribution is in Bayesian statistics as a prior for the Binomial distribution. The Beta distribution is also used in beta regression, which can be useful when the dependent variable has a floor or ceiling effect or is bounded.

In scientific software for statistical computing and graphics, function dbeta computes density of a beta distribution, pbeta computes CDF of a beta distribution, qbeta computes quantile of beta distribution and rbeta draw samples from a beta distribution.

Tag usage

Questions on should be about implementation and programming problems, not about the statistical or theoretical properties of the technique. Consider whether your question might be better suited to Cross Validated, the StackExchange site for statistics, machine learning and data analysis.

85 questions
3
votes
1 answer

Plot beta distribution in R

Using the dataset Lahman::Batting I've estimated parameters for the beta distribution. Now I want to plot this empirically derived beta distribution onto the histogram that I estimated it from. library(dplyr) library(tidyr) library(Lahman) career…
Rich Pauloo
  • 7,734
  • 4
  • 37
  • 69
3
votes
3 answers

Where can I find simple beta cdf implementation

I need to use beta distribution and inverse beta distribution in my project. There is quite good but complicated implementation in GSL, but I don't want to use such a big library only to get one function. I would like to either, implement it on my…
Gacek
  • 10,184
  • 9
  • 54
  • 87
2
votes
1 answer

How to get a sigmoid function between 0 and 1 for probability of correct answer?

I am trying to simulate some data where a response can either be right (1) or wrong (0). I am thus trying to find a distribution in which there are four conditions (in this case degrees of a circle). Thus, the x axis is pi/2, pi, pi1.5, 2pi. I have…
2
votes
1 answer

How to find the alpha parameter of beta distribution

I am trying to find the MLE estimate of alpha of a beta distribution given beta = 1. I tried using maxlogL from the estimationtools package but g x <- rbeta(n = 1000, shape1 = 0.7, shape2 = 1) alpha_hat <- maxlogL(x = x, dist = "dbeta", fixed =…
EefNL
  • 23
  • 2
2
votes
0 answers

Convolve two pdfs from generalized beta prime distributions

I have two pdfs from generalized beta prime distributions and wish to combine them into a single pdf via convolution. Is such a thing possible in R? E.g., How can I combine the given posterior distributions Y1 and Y2 below? require(extraDistr) X <-…
user111024
  • 723
  • 3
  • 15
2
votes
2 answers

Intuition behind a minimizer

I'm very new in quantitative and scientifical programming and I've run into the minimizer function of scipy scipy.optimize.fmin. Can someone explain me the basic intuition of this function for a non-engineering student? Letz say I want to minimize…
Krasnars
  • 350
  • 2
  • 17
2
votes
3 answers

Apply MASS::fitdistr to multiple data by a factor

My question is at the end in bold. I know how to fit the beta distribution to some data. For instance: library(Lahman) library(dplyr) # clean up the data and calculate batting averages by playerID batting_by_decade <- Batting %>% filter(AB > 0)…
Rich Pauloo
  • 7,734
  • 4
  • 37
  • 69
2
votes
1 answer

Latin hypercube sample from beta distribution with matlab

I need to extract 10000 samples from a beta distribution with the help of Latin hypercube. the lhsnorm command only helps in case of a normal distribution. I also could not find much under lhsdesign. How should I do this? Thanks in advance.
2
votes
0 answers

Distribution of money following different beta-distributions

I am trying to find a methodology (or even better, the code) to do the following in Netlogo. Any help is appreciated (I could always try to rewrite the code from R or Matlab to Netlogo): I have $5000, which I want to distribute following different…
daan166
  • 300
  • 1
  • 10
2
votes
2 answers

Proportion modeling - Betareg errors

I wonder if somebody here can help me. I am trying to fit a beta GLM with betareg package since my dependent variable is a proportion (relative density of whales in 500m grid size) varying from 0 to 1. I have three covariates: Depth (measured in…
2
votes
1 answer

Find intersection between a beta and a normal distribution

I have 2 distributions - 1 beta and 1 normal and I need to find the intersection of their pdfs. I know the parameters for both and am able to visually see the intersection, but am looking for a way for R to calculate the exact point. Anybody have an…
1
vote
3 answers

Why overlaying Beta distribution on a histogram fails for small sample sizes?

For those without a statistics background but who could assist with coding: I have multiple small datasets (around 30 to 200 rows each) and need to determine the best-fitting distribution. One approach is visual inspection, Here I focus on the…
1
vote
1 answer

Generating correlated beta-distributed values in R

I have the written the following code in R with an aim to generate correlated random variables which follow the beta distribution #objective is to generated correlated #beta distributed data library(MASS) library(faux) generate.beta.parameters…
Indian
  • 977
  • 3
  • 12
  • 24
1
vote
1 answer

How to compress proportion data to remove 0 and 1 values?

I am working with data of vegetation cover (proportions) for different height strata (0-5, 5-15, 15-30, >30 cm, and also bare ground) amongst four different sites (sitio) and two different time periods (epoca: breeding and non breeding season). I…
1
vote
2 answers

Beta distribution with bounds at [0.1, 0.5]

I'd like to construct a beta distribution where the mu and sigma are 0.28 and 0.003, respectively, and the distribution is bound at [0.1, 0.5]. import numpy as np import pandas as pd import plotly.express as px from scipy import stats mu =…
matsuo_basho
  • 2,833
  • 8
  • 26
  • 47