beta_pdf()

Applies to: ✅ Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

Returns the probability density beta function.

The beta distribution is commonly used to study variation in the percentage of something across samples, such as the fraction of the day people spend watching television.

Syntax

beta_pdf(x, alpha, beta)

Learn more about syntax conventions.

Parameters

Name Type Required Description
x int, long, or real ✔️ A value at which to evaluate the function.
alpha int, long, or real ✔️ A parameter of the distribution.
beta int, long, or real ✔️ A parameter of the distribution.

Returns

The probability beta density function.

Note

  • If any argument is nonnumeric, the function returns null.
  • If x ≤ 0 or 1 ≤ x, the function returns NaN.
  • If alpha ≤ 0 or beta ≤ 0, the function returns NaN.

Examples

datatable(x:double, alpha:double, beta:double, comment:string)
[
    0.5, 10.0, 20.0, "Valid input",
    1.5, 10.0, 20.0, "x > 1, yields NaN",
    double(-10), 10.0, 20.0, "x < 0, yields NaN",
    0.1, double(-1.0), 20.0, "alpha is < 0, yields NaN"
]
| extend r = beta_pdf(x, alpha, beta)

Output

x alpha beta comment r
0.5 10 20 Valid input 0.746176019310951
1.5 10 20 x > 1, yields NaN NaN
-10 10 20 x < 0, yields NaN NaN
0.1 -1 20 alpha is < 0, yields NaN NaN
  • For computing the inverse of the beta cumulative probability density function, see beta-inv().
  • For the standard cumulative beta distribution function, see beta-cdf().