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,IAC3B,qBAAsB,sEACtB,iBAAkB,CACjB,CAAE,QAAS,gBAAiB,KAAM,eAAgB,MAAOA,EAAS,YAAY,OAAQ,SAAU,IAAA,EAChG,CAAE,QAAS,gBAAiB,KAAM,sBAAuB,MAAOA,EAAS,mBAAmB,OAAQ,SAAU,IAAA,EAC9G,CAAE,QAAS,gBAAiB,KAAM,iBAAkB,MAAOA,EAAS,cAAc,OAAQ,SAAU,IAAA,EACpG,CAAE,QAAS,gBAAiB,KAAM,wBAAyB,MAAOA,EAAS,qBAAqB,OAAQ,SAAU,IAAA,CAAK,CACxH,CAEF","names":["BJU_2015","cmToInches","cm","normalCdf","z","t","p","percentile","value","stat","unit","mean","sd","sizeDataset","pageUrl"],"sources":["../../../../../../src/lib/data/size-stats.ts"],"sourcesContent":["/**\n * Data sources:\n * - Veale et al. 2015 (BJU International meta-analysis, n=15,521)\n *   \"Am I normal? A systematic review and construction of nomograms for flaccid\n *    and erect penis length and circumference in up to 15,521 men\"\n *   https://doi.org/10.1111/bju.13010\n *\n * Distribution: approximately normal.\n */\n\nexport interface MeasurementStat {\n\tmeanCm: number;\n\tsdCm: number;\n\tmeanIn: number;\n\tsdIn: number;\n}\n\nexport const BJU_2015 = {\n\terectLength: { meanCm: 13.12, sdCm: 1.66, meanIn: 5.17, sdIn: 0.65 },\n\tflaccidLength: { meanCm: 9.16, sdCm: 1.57, meanIn: 3.61, sdIn: 0.62 },\n\terectCircumference: { meanCm: 11.66, sdCm: 1.1, meanIn: 4.59, sdIn: 0.43 },\n\tflaccidCircumference: { meanCm: 9.31, sdCm: 0.9, meanIn: 3.67, sdIn: 0.35 },\n\tsource: {\n\t\tcitation: 'Veale et al. (2015). BJU International, 115(6), 978-986.',\n\t\turl: 'https://doi.org/10.1111/bju.13010',\n\t\tsampleSize: 15521\n\t}\n} as const;\n\nexport function cmToInches(cm: number): number {\n\treturn cm / 2.54;\n}\n\nexport function inchesToCm(inches: number): number {\n\treturn inches * 2.54;\n}\n\n/** Standard normal CDF via Abramowitz & Stegun 26.2.17 */\nexport function normalCdf(z: number): number {\n\tconst t = 1 / (1 + 0.2316419 * Math.abs(z));\n\tconst d = 0.3989422804014327 * Math.exp(-0.5 * z * z);\n\tconst p =\n\t\td *\n\t\tt *\n\t\t(0.31938153 +\n\t\t\tt *\n\t\t\t\t(-0.356563782 +\n\t\t\t\t\tt * (1.781477937 + t * (-1.821255978 + t * 1.330274429))));\n\treturn z > 0 ? 1 - p : p;\n}\n\nexport function percentile(value: number, stat: MeasurementStat, unit: 'cm' | 'in'): number {\n\tconst mean = unit === 'cm' ? stat.meanCm : stat.meanIn;\n\tconst sd = unit === 'cm' ? stat.sdCm : stat.sdIn;\n\tconst z = (value - mean) / sd;\n\treturn Math.round(normalCdf(z) * 1000) / 10;\n}\n\n/**\n * schema.org Dataset for the pooled size nomogram (Veale et al. 2015), shown on\n * the stats/calculator pages. Dataset is the one structured-data type that still\n * earns visibility (Google Dataset Search) and helps AI engines cite the numbers\n * — attributed to the source study via creator/citation, published by RateMyD.\n * `pageUrl` is the canonical URL of the page presenting it.\n */\nexport function sizeDataset(pageUrl: string) {\n\treturn {\n\t\t'@context': 'https://schema.org',\n\t\t'@type': 'Dataset',\n\t\t'@id': `${pageUrl}#dataset`,\n\t\tname: 'Average penis size — pooled nomogram (n=15,521)',\n\t\tdescription:\n\t\t\t'Flaccid and erect penile length and circumference pooled from up to 15,521 men (Veale et al. 2015, BJU International), used by RateMyD as the basis for its free size percentile calculator.',\n\t\turl: pageUrl,\n\t\tcreator: { '@type': 'Organization', name: 'Veale et al., BJU International' },\n\t\tpublisher: { '@type': 'Organization', name: 'RateMyD', url: 'https://www.ratemyd.app' },\n\t\tcitation: BJU_2015.source.url,\n\t\tisBasedOn: BJU_2015.source.url,\n\t\tmeasurementTechnique: 'Clinician-measured (self-reported data excluded from the nomograms)',\n\t\tvariableMeasured: [\n\t\t\t{ '@type': 'PropertyValue', name: 'Erect length', value: BJU_2015.erectLength.meanCm, unitText: 'cm' },\n\t\t\t{ '@type': 'PropertyValue', name: 'Erect circumference', value: BJU_2015.erectCircumference.meanCm, unitText: 'cm' },\n\t\t\t{ '@type': 'PropertyValue', name: 'Flaccid length', value: BJU_2015.flaccidLength.meanCm, unitText: 'cm' },\n\t\t\t{ '@type': 'PropertyValue', name: 'Flaccid circumference', value: BJU_2015.flaccidCircumference.meanCm, unitText: 'cm' }\n\t\t]\n\t};\n}\n"],"version":3}