
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@stdlib/stats-base-dists-betaprime-stdev
Advanced tools
We believe in a future in which the web is a preferred environment for numerical computation. To help realize this future, we've built stdlib. stdlib is a standard library, with an emphasis on numerical and scientific computation, written in JavaScript (and C) for execution in browsers and in Node.js.
The library is fully decomposable, being architected in such a way that you can swap out and mix and match APIs and functionality to cater to your exact preferences and use cases.
When you use stdlib, you can be absolutely certain that you are using the most thorough, rigorous, well-written, studied, documented, tested, measured, and high-quality code out there.
To join us in bringing numerical computing to the web, get started by checking us out on GitHub, and please consider financially supporting stdlib. We greatly appreciate your continued support!
Beta prime distribution standard deviation.
The standard deviation for a beta prime random variable with first shape parameter α and second shape parameter β is
when α > 0 and β > 2. Otherwise, the standard deviation is not defined.
npm install @stdlib/stats-base-dists-betaprime-stdev
var stdev = require( '@stdlib/stats-base-dists-betaprime-stdev' );
Returns the standard deviation of a beta prime distribution with parameters alpha (first shape parameter) and beta (second shape parameter).
var v = stdev( 1.0, 3.0 );
// returns ~0.866
v = stdev( 4.0, 12.0 );
// returns ~0.223
v = stdev( 8.0, 2.5 );
// returns ~8.219
If provided NaN as any argument, the function returns NaN.
var v = stdev( NaN, 2.0 );
// returns NaN
v = stdev( 2.0, NaN );
// returns NaN
If provided alpha <= 0, the function returns NaN.
var v = stdev( 0.0, 1.0 );
// returns NaN
v = stdev( -1.0, 1.0 );
// returns NaN
If provided beta <= 2, the function returns NaN.
var v = stdev( 1.0, 2.0 );
// returns NaN
v = stdev( 1.0, 0.0 );
// returns NaN
v = stdev( 1.0, -1.0 );
// returns NaN
var uniform = require( '@stdlib/random-array-uniform' );
var logEachMap = require( '@stdlib/console-log-each-map' );
var EPS = require( '@stdlib/constants-float64-eps' );
var stdev = require( '@stdlib/stats-base-dists-betaprime-stdev' );
var opts = {
'dtype': 'float64'
};
var alpha = uniform( 10, EPS, 10.0, opts );
var beta = uniform( 10, 2.0 + EPS, 10.0, opts );
logEachMap( 'α: %0.4f, β: %0.4f, SD(X;α,β): %0.4f', alpha, beta, stdev );
#include "stdlib/stats/base/dists/betaprime/stdev.h"
Returns the standard deviation of a beta prime distribution.
double out = stdlib_base_dists_betaprime_stdev( 1.0, 3.0 );
// returns ~0.866
The function accepts the following arguments:
[in] double first shape parameter.[in] double second shape parameter.double stdlib_base_dists_betaprime_stdev( const double alpha, const double beta );
#include "stdlib/stats/base/dists/betaprime/stdev.h"
#include <stdlib.h>
#include <stdio.h>
static double random_uniform( const double min, const double max ) {
double v = (double)rand() / ( (double)RAND_MAX + 1.0 );
return min + ( v * ( max - min ) );
}
int main( void ) {
double alpha;
double beta;
double y;
int i;
for ( i = 0; i < 25; i++ ) {
alpha = random_uniform( 0.0, 20.0 );
beta = random_uniform( 2.0, 22.0 );
y = stdlib_base_dists_betaprime_stdev( alpha, beta );
printf( "α: %lf, β: %lf, SD(X;α,β): %lf\n", alpha, beta, y );
}
}
This package is part of stdlib, a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing. The library provides a collection of robust, high performance libraries for mathematics, statistics, streams, utilities, and more.
For more information on the project, filing bug reports and feature requests, and guidance on how to develop stdlib, see the main project repository.
See LICENSE.
Copyright © 2016-2026. The Stdlib Authors.
FAQs
Beta prime distribution standard deviation.
We found that @stdlib/stats-base-dists-betaprime-stdev demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.