Compute · Transform · Data & Research
Compute the Van Westendorp acceptable price range
I enter each respondent's four price answers and get back the deterministic Van Westendorp points (PMC, PME, OPP, IPP) on the observed price grid, so I have a defensible acceptable-price band.
You receive: A pure function computing {pmc, pme, opp, ipp} from per-respondent price answers, graded on hidden input->output cases against a held-out reference.
Part of Choose Business Model
What's verified: STUD verifies the function reproduces the declared discrete Van Westendorp convention exactly on hidden response sets: cumulative shares evaluated on the sorted grid of all supplied prices, each point being the first grid price where the rising curve meets or exceeds the falling one (PMC: not-a-bargain vs too-cheap; PME: too-expensive vs not-yet-expensive; OPP: too-expensive vs too-cheap; IPP: expensive vs bargain). STUD does NOT verify that the survey sample is representative, that respondents are real buyers, or that the band is the price to charge; and rows are expected price-ascending per respondent (too cheap <= bargain <= expensive <= too expensive).
Opens soon
This objective is verified and ready. It opens soon, once sign-in and payments are live.
Deliverable interface
The exact vocabulary the automated check enforces: keys, tokens, entry points, and worked examples. Generated from the verification source.
{
"constants": {},
"entryName": "compute_van_westendorp_price_range",
"expectNote": "expect is the comparison-space value (your return value goes through normalize first when one is published)",
"hiddenCaseCount": 12,
"hiddenCaseNames": [
"hd_three_strict",
"hd_all_equal_fallback",
"hd_two_clusters",
"hd_five_strict",
"gen0",
"gen1",
"gen2",
"gen3",
"gen4",
"gen5",
"gen6",
"gen7"
],
"inputKeys": [
"bargain",
"expensive",
"responses",
"tooCheap",
"tooExpensive"
],
"normalizeSource": "def _normalize_compute_van_westendorp_price_range(r):\n if not isinstance(r, dict):\n return repr(r)\n try:\n return {k: round(float(r[k]), 2) for k in (\"pmc\", \"pme\", \"opp\", \"ipp\")}\n except Exception:\n return repr(r)\n",
"returnShapes": [
[
"ipp",
"opp",
"pmc",
"pme"
]
],
"signature": "def compute_van_westendorp_price_range(inp):",
"submission": "python exposing the entry function; inp is one input object; graded on held-out cases",
"tier": "calculator",
"visibleCases": [
{
"expect": {
"ipp": 60,
"opp": 60,
"pmc": 60,
"pme": 70
},
"input": {
"responses": [
{
"bargain": 50,
"expensive": 60,
"tooCheap": 40,
"tooExpensive": 70
},
{
"bargain": 50,
"expensive": 70,
"tooCheap": 40,
"tooExpensive": 70
},
{
"bargain": 60,
"expensive": 60,
"tooCheap": 50,
"tooExpensive": 80
},
{
"bargain": 50,
"expensive": 70,
"tooCheap": 30,
"tooExpensive": 80
}
]
},
"name": "four_respondents"
},
{
"expect": {
"ipp": 60,
"opp": 40,
"pmc": 40,
"pme": 60
},
"input": {
"responses": [
{
"bargain": 40,
"expensive": 60,
"tooCheap": 30,
"tooExpensive": 70
}
]
},
"name": "single_respondent"
},
{
"expect": {
"ipp": 50,
"opp": 30,
"pmc": 30,
"pme": 50
},
"input": {
"responses": [
{
"bargain": 30,
"expensive": 50,
"tooCheap": 20,
"tooExpensive": 60
},
{
"bargain": 30,
"expensive": 50,
"tooCheap": 20,
"tooExpensive": 60
},
{
"bargain": 30,
"expensive": 50,
"tooCheap": 20,
"tooExpensive": 60
}
]
},
"name": "identical_respondents"
},
{
"expect": {
"ipp": 40,
"opp": 40,
"pmc": 30,
"pme": 50
},
"input": {
"responses": [
{
"bargain": 20,
"expensive": 40,
"tooCheap": 10,
"tooExpensive": 50
},
{
"bargain": 40,
"expensive": 80,
"tooCheap": 30,
"tooExpensive": 100
}
]
},
"name": "two_spread_respondents"
}
],
"vocabulary": [
"bargain",
"expensive",
"ipp",
"opp",
"pmc",
"pme",
"responses",
"tooCheap",
"tooExpensive"
]
}Get early access to STUD the day it goes live.