Statistics
Weighted survey score API
Combines sub-scores with arbitrary (non-normalized) weights into a weighted total and weighted mean, normalizes the weights, and expresses the result as a percentage of a max score. Answers 'What is my weighted composite survey score?', 'How do unequal section weights roll up?'.
Price$0.02per request
MethodPOST
Route/v1/stats/weighted-survey-score
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
surveyweighted-scorecompositescoringindexrollupweightingquestionnaire
API URL
Integration docshttps://x402.hexl.dev/v1/stats/weighted-survey-scoreExample request
{
"scores": [
80,
90,
70
],
"weights": [
0.5,
0.3,
0.2
],
"maxScore": 100
}Example response
{
"weightedScore": 81,
"weightedMean": 81,
"normalizedWeights": [
0.5,
0.3,
0.2
],
"sumWeights": 1,
"nItems": 3,
"percentOfMax": 81
}Input schema
{
"type": "object",
"required": [
"scores",
"weights"
],
"properties": {
"scores": {
"type": "array",
"items": {
"type": "number"
},
"examples": [
[
80,
90,
70
]
]
},
"weights": {
"type": "array",
"items": {
"type": "number"
},
"examples": [
[
0.5,
0.3,
0.2
]
]
},
"maxScore": {
"type": "number",
"examples": [
100
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}