Skip to main content
POST
/
quantlib
/
economics
/
utility
/
stochastic-dominance
Stochastic Dominance Test
curl --request POST \
  --url https://finceptbackend.share.zrok.io/quantlib/economics/utility/stochastic-dominance \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "cdf_a": [
    [
      0,
      0
    ],
    [
      5,
      0.3
    ],
    [
      10,
      0.7
    ],
    [
      15,
      1
    ]
  ],
  "cdf_b": [
    [
      0,
      0
    ],
    [
      5,
      0.5
    ],
    [
      10,
      0.9
    ],
    [
      15,
      1
    ]
  ],
  "order": 1
}
'
{
  "success": true,
  "data": {
    "first_order_dominance_a_over_b": true
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication. Get your key at https://finceptbackend.share.zrok.io/auth/register

Body

application/json
cdf_a
number[][]
required

CDF of lottery A as [[x1, F_A(x1)], [x2, F_A(x2)], ...]

Minimum array length: 2
Required array length: 2 elements
Example:
[[0, 0], [5, 0.3], [10, 0.7], [15, 1]]
cdf_b
number[][]
required

CDF of lottery B as [[x1, F_B(x1)], [x2, F_B(x2)], ...]

Minimum array length: 2
Required array length: 2 elements
Example:
[[0, 0], [5, 0.5], [10, 0.9], [15, 1]]
order
enum<integer>
default:1

Order of dominance (1 for FSD, 2 for SSD)

Available options:
1,
2
Example:

1

Response

Successful Response

success
boolean
Example:

true

data
object