|
<!DOCTYPE html> |
|
<html lang="en"> |
|
<head> |
|
<meta charset="UTF-8"> |
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
<title>SportsBet Pro Calculator | Advanced Player Prop Analysis</title> |
|
<script src="https://cdn.tailwindcss.com"></script> |
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> |
|
<script> |
|
tailwind.config = { |
|
theme: { |
|
extend: { |
|
colors: { |
|
primary: '#1e40af', |
|
secondary: '#1e3a8a', |
|
accent: '#3b82f6', |
|
dark: '#0f172a', |
|
light: '#f8fafc' |
|
} |
|
} |
|
} |
|
} |
|
</script> |
|
<style> |
|
.gradient-bg { |
|
background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%); |
|
} |
|
.card-shadow { |
|
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); |
|
} |
|
.input-highlight { |
|
transition: all 0.3s ease; |
|
} |
|
.input-highlight:focus { |
|
border-color: #3b82f6; |
|
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3); |
|
} |
|
.tab-active { |
|
border-bottom: 3px solid #3b82f6; |
|
color: #3b82f6; |
|
font-weight: 600; |
|
} |
|
.result-card { |
|
transition: transform 0.3s ease, box-shadow 0.3s ease; |
|
} |
|
.result-card:hover { |
|
transform: translateY(-5px); |
|
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); |
|
} |
|
</style> |
|
</head> |
|
<body class="bg-gray-50 min-h-screen"> |
|
|
|
<header class="gradient-bg text-white"> |
|
<div class="container mx-auto px-4 py-6"> |
|
<div class="flex justify-between items-center"> |
|
<div class="flex items-center space-x-2"> |
|
<i class="fas fa-calculator text-3xl"></i> |
|
<h1 class="text-2xl font-bold">SportsBet Pro</h1> |
|
</div> |
|
<nav> |
|
<ul class="flex space-x-6"> |
|
<li><a href="#calculator" class="hover:text-blue-200 transition">Calculator</a></li> |
|
</ul> |
|
</nav> |
|
</div> |
|
</div> |
|
</header> |
|
|
|
|
|
<section class="gradient-bg text-white py-16"> |
|
<div class="container mx-auto px-4 text-center"> |
|
<h2 class="text-4xl font-bold mb-4">NBA Advanced Player Prop Calculator</h2> |
|
<p class="text-xl max-w-2xl mx-auto mb-8">Analyze and compare no-vig probabilities and statistical predictions for player props with our professional tools</p> |
|
<a href="#calculator" class="bg-white text-primary px-6 py-3 rounded-lg font-semibold hover:bg-blue-50 transition inline-block">Get Started</a> |
|
</div> |
|
</section> |
|
|
|
|
|
<section id="calculator" class="py-12 bg-white"> |
|
<div class="container mx-auto px-4"> |
|
<h2 class="text-3xl font-bold text-center mb-12 text-dark">Player Prop Calculator</h2> |
|
|
|
|
|
<div class="flex justify-center mb-8 border-b border-gray-200"> |
|
<button id="noVigTab" class="px-6 py-3 font-medium text-gray-600 hover:text-primary transition tab-active">No-Vig Calculator</button> |
|
<button id="statisticalTab" class="px-6 py-3 font-medium text-gray-600 hover:text-primary transition">Statistical Prediction</button> |
|
<button id="compareTab" class="px-6 py-3 font-medium text-gray-600 hover:text-primary transition">Compare Results</button> |
|
</div> |
|
|
|
|
|
<div id="noVigContent" class="calculator-content"> |
|
<div class="max-w-4xl mx-auto bg-gray-50 rounded-xl p-8 card-shadow"> |
|
<h3 class="text-2xl font-semibold mb-6 text-dark">No-Vig Probability Calculator</h3> |
|
<div class="grid md:grid-cols-2 gap-6"> |
|
<div> |
|
<label class="block text-gray-700 mb-2">Over Odds (American)</label> |
|
<input type="number" id="overOdds" placeholder="-122" class="w-full px-4 py-2 border rounded-lg input-highlight"> |
|
</div> |
|
<div> |
|
<label class="block text-gray-700 mb-2">Under Odds (American)</label> |
|
<input type="number" id="underOdds" placeholder="+162" class="w-full px-4 py-2 border rounded-lg input-highlight"> |
|
</div> |
|
</div> |
|
<div class="mt-6"> |
|
<label class="block text-gray-700 mb-2">Player Name (Optional)</label> |
|
<input type="text" id="playerName" placeholder="Search player..." class="w-full px-4 py-2 border rounded-lg input-highlight"> |
|
</div> |
|
<div class="mt-6"> |
|
<label class="block text-gray-700 mb-2">Stat Type</label> |
|
<select id="statType" class="w-full px-4 py-2 border rounded-lg input-highlight"> |
|
<option value="points">Points</option> |
|
<option value="rebounds">Rebounds</option> |
|
<option value="assists">Assists</option> |
|
<option value="other">Other</option> |
|
</select> |
|
</div> |
|
<button id="calculateNoVig" class="mt-8 bg-primary text-white px-6 py-3 rounded-lg font-semibold hover:bg-secondary transition w-full">Calculate No-Vig Probabilities</button> |
|
</div> |
|
|
|
|
|
<div id="noVigResults" class="max-w-4xl mx-auto mt-8 hidden"> |
|
<div class="bg-white rounded-xl p-8 card-shadow"> |
|
<h4 class="text-xl font-semibold mb-4 text-dark">No-Vig Probability Results</h4> |
|
<div class="grid md:grid-cols-2 gap-6"> |
|
<div class="result-card bg-gray-50 p-6 rounded-lg"> |
|
<h5 class="font-medium text-gray-700 mb-2">Over Probability</h5> |
|
<p id="overProb" class="text-3xl font-bold text-primary">--%</p> |
|
</div> |
|
<div class="result-card bg-gray-50 p-6 rounded-lg"> |
|
<h5 class="font-medium text-gray-700 mb-2">Under Probability</h5> |
|
<p id="underProb" class="text-3xl font-bold text-primary">--%</p> |
|
</div> |
|
</div> |
|
<div class="mt-6"> |
|
<button id="saveNoVig" class="bg-accent text-white px-4 py-2 rounded-lg font-medium hover:bg-blue-500 transition">Save for Comparison</button> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
|
|
|
|
<div id="statisticalContent" class="calculator-content hidden"> |
|
<div class="max-w-4xl mx-auto bg-gray-50 rounded-xl p-8 card-shadow"> |
|
<h3 class="text-2xl font-semibold mb-6 text-dark">Statistical Prediction Calculator</h3> |
|
<div class="grid md:grid-cols-2 gap-6"> |
|
<div> |
|
<label class="block text-gray-700 mb-2">Projected Mean (μ)</label> |
|
<input type="number" step="0.1" id="meanValue" placeholder="e.g. 22.5" class="w-full px-4 py-2 border rounded-lg input-highlight"> |
|
</div> |
|
<div> |
|
<label class="block text-gray-700 mb-2">Standard Deviation (σ)</label> |
|
<div class="flex"> |
|
<input type="number" step="0.1" id="stdDevValue" placeholder="e.g. 5.2" class="w-full px-4 py-2 border rounded-l-lg input-highlight"> |
|
<button id="calculateStdDev" class="bg-gray-200 px-4 py-2 border rounded-r-lg hover:bg-gray-300 transition">Calculate σ</button> |
|
</div> |
|
</div> |
|
</div> |
|
<div class="mt-6"> |
|
<label class="block text-gray-700 mb-2">Line Value (X)</label> |
|
<input type="number" step="0.1" id="lineValue" placeholder="e.g. 24.5" class="w-full px-4 py-2 border rounded-lg input-highlight"> |
|
</div> |
|
<div class="mt-6"> |
|
<label class="block text-gray-700 mb-2">Player Name (Optional)</label> |
|
<input type="text" id="statPlayerName" placeholder="Search player..." class="w-full px-4 py-2 border rounded-lg input-highlight"> |
|
</div> |
|
<div class="mt-6"> |
|
<label class="block text-gray-700 mb-2">Stat Type</label> |
|
<select id="statStatType" class="w-full px-4 py-2 border rounded-lg input-highlight"> |
|
<option value="points">Points</option> |
|
<option value="rebounds">Rebounds</option> |
|
<option value="assists">Assists</option> |
|
<option value="other">Other</option> |
|
</select> |
|
</div> |
|
<button id="calculateStatistical" class="mt-8 bg-primary text-white px-6 py-3 rounded-lg font-semibold hover:bg-secondary transition w-full">Calculate Statistical Probabilities</button> |
|
</div> |
|
|
|
|
|
<div id="stdDevModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50"> |
|
<div class="bg-white rounded-xl p-8 max-w-md w-full mx-4"> |
|
<h4 class="text-xl font-semibold mb-4">Calculate Standard Deviation</h4> |
|
<div class="mb-4"> |
|
<label class="block text-gray-700 mb-2">Enter historical data (comma separated)</label> |
|
<textarea id="historicalData" class="w-full px-4 py-2 border rounded-lg input-highlight" rows="4" placeholder="e.g. 18, 22, 25, 19, 21"></textarea> |
|
</div> |
|
<div class="flex justify-end space-x-4"> |
|
<button id="cancelStdDev" class="px-4 py-2 border rounded-lg hover:bg-gray-100 transition">Cancel</button> |
|
<button id="confirmStdDev" class="bg-primary text-white px-4 py-2 rounded-lg hover:bg-secondary transition">Calculate</button> |
|
</div> |
|
</div> |
|
</div> |
|
|
|
|
|
<div id="statisticalResults" class="max-w-4xl mx-auto mt-8 hidden"> |
|
<div class="bg-white rounded-xl p-8 card-shadow"> |
|
<h4 class="text-xl font-semibold mb-4 text-dark">Statistical Prediction Results</h4> |
|
<div class="grid md:grid-cols-2 gap-6"> |
|
<div class="result-card bg-gray-50 p-6 rounded-lg"> |
|
<h5 class="font-medium text-gray-700 mb-2">Probability Over</h5> |
|
<p id="statOverProb" class="text-3xl font-bold text-primary">--%</p> |
|
<p class="text-sm text-gray-500 mt-1">(1−Φ((X−μ)/σ))×100%</p> |
|
</div> |
|
<div class="result-card bg-gray-50 p-6 rounded-lg"> |
|
<h5 class="font-medium text-gray-700 mb-2">Probability Under</h5> |
|
<p id="statUnderProb" class="text-3xl font-bold text-primary">--%</p> |
|
<p class="text-sm text-gray-500 mt-1">Φ((X−μ)/σ)×100%</p> |
|
</div> |
|
</div> |
|
<div class="mt-6"> |
|
<button id="saveStatistical" class="bg-accent text-white px-4 py-2 rounded-lg font-medium hover:bg-blue-500 transition">Save for Comparison</button> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
|
|
|
|
<div id="compareContent" class="calculator-content hidden"> |
|
<div class="max-w-4xl mx-auto bg-gray-50 rounded-xl p-8 card-shadow"> |
|
<h3 class="text-2xl font-semibold mb-6 text-dark">Compare Calculation Methods</h3> |
|
|
|
<div id="noSavedResults" class="text-center py-8"> |
|
<i class="fas fa-exchange-alt text-4xl text-gray-300 mb-4"></i> |
|
<p class="text-gray-500">No saved results to compare yet. Calculate and save results from the other tabs to compare them here.</p> |
|
</div> |
|
|
|
<div id="comparisonResults" class="hidden"> |
|
<div class="grid md:grid-cols-2 gap-6 mb-8"> |
|
<div class="bg-white p-6 rounded-lg card-shadow"> |
|
<h4 class="text-lg font-semibold mb-4" id="compareMethod1">Method 1</h4> |
|
<div class="space-y-4"> |
|
<div> |
|
<p class="text-gray-600">Over Probability</p> |
|
<p class="text-xl font-bold" id="compareOver1">--%</p> |
|
</div> |
|
<div> |
|
<p class="text-gray-600">Under Probability</p> |
|
<p class="text-xl font-bold" id="compareUnder1">--%</p> |
|
</div> |
|
</div> |
|
</div> |
|
<div class="bg-white p-6 rounded-lg card-shadow"> |
|
<h4 class="text-lg font-semibold mb-4" id="compareMethod2">Method 2</h4> |
|
<div class="space-y-4"> |
|
<div> |
|
<p class="text-gray-600">Over Probability</p> |
|
<p class="text-xl font-bold" id="compareOver2">--%</p> |
|
</div> |
|
<div> |
|
<p class="text-gray-600">Under Probability</p> |
|
<p class="text-xl font-bold" id="compareUnder2">--%</p> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
|
|
<div class="bg-white p-6 rounded-lg card-shadow"> |
|
<h4 class="text-lg font-semibold mb-4">Comparison Analysis</h4> |
|
<div class="space-y-4"> |
|
<div> |
|
<p class="text-gray-600">Over Probability Difference</p> |
|
<p class="text-xl font-bold" id="overDiff">--%</p> |
|
</div> |
|
<div> |
|
<p class="text-gray-600">Under Probability Difference</p> |
|
<p class="text-xl font-bold" id="underDiff">--%</p> |
|
</div> |
|
<div> |
|
<p class="text-gray-600">Recommendation</p> |
|
<p class="text-lg font-semibold" id="recommendation">--</p> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
</section> |
|
|
|
|
|
<section id="how-to-use" class="py-12 bg-gray-50"> |
|
<div class="container mx-auto px-4"> |
|
<h2 class="text-3xl font-bold text-center mb-12 text-dark">How to Use the Calculator</h2> |
|
|
|
<div class="max-w-4xl mx-auto"> |
|
<div class="bg-white rounded-xl p-8 card-shadow mb-8"> |
|
<h3 class="text-2xl font-semibold mb-4 text-dark flex items-center"> |
|
<i class="fas fa-percentage mr-3 text-primary"></i> No-Vig Calculator |
|
</h3> |
|
<div class="space-y-4"> |
|
<p>1. <strong>Find player prop odds</strong> from sportsbooks like FanDuel (search at <a href="https://sportsbook.fanduel.com/search" class="text-accent hover:underline" target="_blank">sportsbook.fanduel.com/search</a>)</p> |
|
<p>2. <strong>Enter the American odds</strong> for both Over and Under (e.g., -122 for Over, +162 for Under)</p> |
|
<p>3. Optionally enter the player name and stat type for reference</p> |
|
<p>4. Click "Calculate No-Vig Probabilities" to see the true probabilities without the bookmaker's vig</p> |
|
<p>5. Save results to compare with other methods</p> |
|
</div> |
|
</div> |
|
|
|
<div class="bg-white rounded-xl p-8 card-shadow mb-8"> |
|
<h3 class="text-2xl font-semibold mb-4 text-dark flex items-center"> |
|
<i class="fas fa-chart-line mr-3 text-primary"></i> Statistical Prediction |
|
</h3> |
|
<div class="space-y-4"> |
|
<p>1. <strong>Determine the projected mean (μ)</strong> for the player's performance (based on historical data or projections)</p> |
|
<p>2. <strong>Enter the standard deviation (σ)</strong> or calculate it using historical data</p> |
|
<p>3. <strong>Input the line value (X)</strong> you want to evaluate against</p> |
|
<p>4. Optionally enter the player name and stat type for reference</p> |
|
<p>5. Click "Calculate Statistical Probabilities" to see the predicted probabilities</p> |
|
<p>6. Save results to compare with other methods</p> |
|
</div> |
|
</div> |
|
|
|
<div class="bg-white rounded-xl p-8 card-shadow"> |
|
<h3 class="text-2xl font-semibold mb-4 text-dark flex items-center"> |
|
<i class="fas fa-balance-scale mr-3 text-primary"></i> Compare Results |
|
</h3> |
|
<div class="space-y-4"> |
|
<p>1. <strong>Calculate and save results</strong> from both methods above</p> |
|
<p>2. <strong>Navigate to the Compare tab</strong> to view side-by-side analysis</p> |
|
<p>3. The calculator will show probability differences and provide a recommendation</p> |
|
<p>4. Use this comparison to identify potential value bets where methods disagree</p> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
</section> |
|
|
|
|
|
<section id="about" class="py-12 bg-white"> |
|
<div class="container mx-auto px-4"> |
|
<div class="max-w-4xl mx-auto"> |
|
<h2 class="text-3xl font-bold text-center mb-12 text-dark">About SportsBet Pro Calculator</h2> |
|
|
|
<div class="bg-gray-50 rounded-xl p-8 card-shadow"> |
|
<div class="space-y-6"> |
|
<div> |
|
<h3 class="text-xl font-semibold mb-2 text-dark">No-Vig Probability</h3> |
|
<p class="text-gray-700">The no-vig calculator removes the bookmaker's margin (vigorish) to show the true implied probabilities of each outcome. This helps you understand the market's actual assessment of probabilities without the book's built-in advantage.</p> |
|
</div> |
|
|
|
<div> |
|
<h3 class="text-xl font-semibold mb-2 text-dark">Statistical Prediction</h3> |
|
<p class="text-gray-700">Using the normal distribution formula, this method calculates the probability of a player exceeding or falling short of a given line based on their projected performance (mean) and consistency (standard deviation). The formula used is:</p> |
|
<div class="bg-gray-100 p-4 rounded-lg mt-2"> |
|
<p class="font-mono text-sm"> |
|
Probability Over = (1−Φ((X−μ)/σ))×100%<br> |
|
Probability Under = Φ((X−μ)/σ)×100% |
|
</p> |
|
</div> |
|
<p class="text-gray-700 mt-2">Where Φ is the cumulative distribution function of the standard normal distribution.</p> |
|
</div> |
|
|
|
<div> |
|
<h3 class="text-xl font-semibold mb-2 text-dark">Standard Deviation</h3> |
|
<p class="text-gray-700">Standard deviation (σ) measures how spread out a player's performance is from their average. A higher σ means more variability in outcomes. You can calculate σ by entering historical performance data for the player.</p> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
</section> |
|
|
|
|
|
<footer class="bg-dark text-white py-8"> |
|
<div class="container mx-auto px-4"> |
|
<div class="flex flex-col md:flex-row justify-between items-center"> |
|
<div class="flex items-center space-x-2 mb-4 md:mb-0"> |
|
<i class="fas fa-calculator text-2xl"></i> |
|
<span class="text-xl font-bold">SportsBet Pro</span> |
|
</div> |
|
<div class="text-center md:text-right"> |
|
<p class="text-gray-400">© 2023 SportsBet Pro Calculator. All rights reserved.</p> |
|
<p class="text-gray-400 text-sm mt-1">For entertainment purposes only. Gamble responsibly.</p> |
|
</div> |
|
</div> |
|
</div> |
|
</footer> |
|
|
|
<script> |
|
|
|
document.addEventListener('DOMContentLoaded', function() { |
|
const tabs = { |
|
noVig: { |
|
tab: document.getElementById('noVigTab'), |
|
content: document.getElementById('noVigContent') |
|
}, |
|
statistical: { |
|
tab: document.getElementById('statisticalTab'), |
|
content: document.getElementById('statisticalContent') |
|
}, |
|
compare: { |
|
tab: document.getElementById('compareTab'), |
|
content: document.getElementById('compareContent') |
|
} |
|
}; |
|
|
|
|
|
activateTab('noVig'); |
|
|
|
|
|
tabs.noVig.tab.addEventListener('click', () => activateTab('noVig')); |
|
tabs.statistical.tab.addEventListener('click', () => activateTab('statistical')); |
|
tabs.compare.tab.addEventListener('click', () => activateTab('compare')); |
|
|
|
function activateTab(activeTab) { |
|
|
|
Object.keys(tabs).forEach(tab => { |
|
tabs[tab].tab.classList.remove('tab-active'); |
|
tabs[tab].content.classList.add('hidden'); |
|
}); |
|
|
|
|
|
tabs[activeTab].tab.classList.add('tab-active'); |
|
tabs[activeTab].content.classList.remove('hidden'); |
|
|
|
|
|
if (activeTab === 'compare') { |
|
updateComparisonView(); |
|
} |
|
} |
|
|
|
|
|
document.getElementById('calculateNoVig').addEventListener('click', calculateNoVig); |
|
|
|
function calculateNoVig() { |
|
const overOdds = parseFloat(document.getElementById('overOdds').value); |
|
const underOdds = parseFloat(document.getElementById('underOdds').value); |
|
|
|
if (isNaN(overOdds) || isNaN(underOdds)) { |
|
alert('Please enter valid odds for both Over and Under'); |
|
return; |
|
} |
|
|
|
|
|
const overProb = americanToImplied(overOdds); |
|
const underProb = americanToImplied(underOdds); |
|
|
|
|
|
const totalProb = overProb + underProb; |
|
const noVigOver = (overProb / totalProb) * 100; |
|
const noVigUnder = (underProb / totalProb) * 100; |
|
|
|
|
|
document.getElementById('overProb').textContent = noVigOver.toFixed(2) + '%'; |
|
document.getElementById('underProb').textContent = noVigUnder.toFixed(2) + '%'; |
|
document.getElementById('noVigResults').classList.remove('hidden'); |
|
|
|
|
|
window.noVigResult = { |
|
method: 'No-Vig Probability', |
|
over: noVigOver, |
|
under: noVigUnder, |
|
player: document.getElementById('playerName').value || 'Unknown Player', |
|
stat: document.getElementById('statType').value |
|
}; |
|
} |
|
|
|
function americanToImplied(odds) { |
|
if (odds > 0) { |
|
return 100 / (odds + 100); |
|
} else { |
|
return -odds / (-odds + 100); |
|
} |
|
} |
|
|
|
|
|
document.getElementById('calculateStatistical').addEventListener('click', calculateStatistical); |
|
document.getElementById('calculateStdDev').addEventListener('click', showStdDevModal); |
|
document.getElementById('cancelStdDev').addEventListener('click', hideStdDevModal); |
|
document.getElementById('confirmStdDev').addEventListener('click', calculateStdDevFromData); |
|
|
|
function calculateStatistical() { |
|
const mean = parseFloat(document.getElementById('meanValue').value); |
|
const stdDev = parseFloat(document.getElementById('stdDevValue').value); |
|
const line = parseFloat(document.getElementById('lineValue').value); |
|
|
|
if (isNaN(mean) || isNaN(stdDev) || isNaN(line)) { |
|
alert('Please enter valid numbers for Mean, Standard Deviation, and Line Value'); |
|
return; |
|
} |
|
|
|
if (stdDev <= 0) { |
|
alert('Standard Deviation must be greater than 0'); |
|
return; |
|
} |
|
|
|
|
|
const z = (line - mean) / stdDev; |
|
|
|
|
|
const underProb = standardNormalCDF(z) * 100; |
|
const overProb = (1 - standardNormalCDF(z)) * 100; |
|
|
|
|
|
document.getElementById('statOverProb').textContent = overProb.toFixed(2) + '%'; |
|
document.getElementById('statUnderProb').textContent = underProb.toFixed(2) + '%'; |
|
document.getElementById('statisticalResults').classList.remove('hidden'); |
|
|
|
|
|
window.statisticalResult = { |
|
method: 'Statistical Prediction', |
|
over: overProb, |
|
under: underProb, |
|
player: document.getElementById('statPlayerName').value || 'Unknown Player', |
|
stat: document.getElementById('statStatType').value |
|
}; |
|
} |
|
|
|
|
|
function standardNormalCDF(z) { |
|
|
|
const t = 1 / (1 + 0.2316419 * Math.abs(z)); |
|
const d = 0.3989423 * Math.exp(-z * z / 2); |
|
let prob = d * t * (0.3193815 + t * (-0.3565638 + t * (1.781478 + t * (-1.821256 + t * 1.330274)))); |
|
|
|
if (z > 0) { |
|
prob = 1 - prob; |
|
} |
|
|
|
return prob; |
|
} |
|
|
|
function showStdDevModal() { |
|
document.getElementById('stdDevModal').classList.remove('hidden'); |
|
} |
|
|
|
function hideStdDevModal() { |
|
document.getElementById('stdDevModal').classList.add('hidden'); |
|
} |
|
|
|
function calculateStdDevFromData() { |
|
const dataInput = document.getElementById('historicalData').value; |
|
const dataPoints = dataInput.split(',').map(item => parseFloat(item.trim())).filter(item => !isNaN(item)); |
|
|
|
if (dataPoints.length < 2) { |
|
alert('Please enter at least 2 valid numbers'); |
|
return; |
|
} |
|
|
|
|
|
const mean = dataPoints.reduce((sum, val) => sum + val, 0) / dataPoints.length; |
|
|
|
|
|
const variance = dataPoints.reduce((sum, val) => sum + Math.pow(val - mean, 2), 0) / dataPoints.length; |
|
|
|
|
|
const stdDev = Math.sqrt(variance); |
|
|
|
|
|
document.getElementById('stdDevValue').value = stdDev.toFixed(2); |
|
|
|
|
|
hideStdDevModal(); |
|
} |
|
|
|
|
|
document.getElementById('saveNoVig').addEventListener('click', () => { |
|
if (window.noVigResult) { |
|
localStorage.setItem('savedNoVigResult', JSON.stringify(window.noVigResult)); |
|
alert('No-Vig results saved for comparison'); |
|
} else { |
|
alert('Please calculate results first'); |
|
} |
|
}); |
|
|
|
document.getElementById('saveStatistical').addEventListener('click', () => { |
|
if (window.statisticalResult) { |
|
localStorage.setItem('savedStatisticalResult', JSON.stringify(window.statisticalResult)); |
|
alert('Statistical results saved for comparison'); |
|
} else { |
|
alert('Please calculate results first'); |
|
} |
|
}); |
|
|
|
|
|
function updateComparisonView() { |
|
const noVigResult = JSON.parse(localStorage.getItem('savedNoVigResult')); |
|
const statisticalResult = JSON.parse(localStorage.getItem('savedStatisticalResult')); |
|
|
|
if (!noVigResult && !statisticalResult) { |
|
document.getElementById('noSavedResults').classList.remove('hidden'); |
|
document.getElementById('comparisonResults').classList.add('hidden'); |
|
return; |
|
} |
|
|
|
document.getElementById('noSavedResults').classList.add('hidden'); |
|
document.getElementById('comparisonResults').classList.remove('hidden'); |
|
|
|
if (noVigResult && statisticalResult) { |
|
|
|
document.getElementById('compareMethod1').textContent = noVigResult.method; |
|
document.getElementById('compareOver1').textContent = noVigResult.over.toFixed(2) + '%'; |
|
document.getElementById('compareUnder1').textContent = noVigResult.under.toFixed(2) + '%'; |
|
|
|
document.getElementById('compareMethod2').textContent = statisticalResult.method; |
|
document.getElementById('compareOver2').textContent = statisticalResult.over.toFixed(2) + '%'; |
|
document.getElementById('compareUnder2').textContent = statisticalResult.under.toFixed(2) + '%'; |
|
|
|
|
|
const overDiff = (statisticalResult.over - noVigResult.over).toFixed(2); |
|
const underDiff = (statisticalResult.under - noVigResult.under).toFixed(2); |
|
|
|
document.getElementById('overDiff').textContent = (overDiff > 0 ? '+' : '') + overDiff + '%'; |
|
document.getElementById('underDiff').textContent = (underDiff > 0 ? '+' : '') + underDiff + '%'; |
|
|
|
|
|
let recommendation = ''; |
|
const threshold = 5; |
|
|
|
if (Math.abs(overDiff) > threshold || Math.abs(underDiff) > threshold) { |
|
if (statisticalResult.over > noVigResult.over + threshold) { |
|
recommendation = 'Statistical model suggests higher Over probability - consider Over bet'; |
|
} else if (statisticalResult.under > noVigResult.under + threshold) { |
|
recommendation = 'Statistical model suggests higher Under probability - consider Under bet'; |
|
} else if (noVigResult.over > statisticalResult.over + threshold) { |
|
recommendation = 'Market suggests higher Over probability than model - caution on Over bet'; |
|
} else if (noVigResult.under > statisticalResult.under + threshold) { |
|
recommendation = 'Market suggests higher Under probability than model - caution on Under bet'; |
|
} |
|
} else { |
|
recommendation = 'Methods generally agree - no strong edge identified'; |
|
} |
|
|
|
document.getElementById('recommendation').textContent = recommendation; |
|
|
|
} else if (noVigResult) { |
|
|
|
document.getElementById('compareMethod1').textContent = noVigResult.method; |
|
document.getElementById('compareOver1').textContent = noVigResult.over.toFixed(2) + '%'; |
|
document.getElementById('compareUnder1').textContent = noVigResult.under.toFixed(2) + '%'; |
|
|
|
document.getElementById('compareMethod2').textContent = 'No saved statistical results'; |
|
document.getElementById('compareOver2').textContent = '--%'; |
|
document.getElementById('compareUnder2').textContent = '--%'; |
|
|
|
document.getElementById('overDiff').textContent = '--%'; |
|
document.getElementById('underDiff').textContent = '--%'; |
|
document.getElementById('recommendation').textContent = 'Save statistical results to compare'; |
|
|
|
} else if (statisticalResult) { |
|
|
|
document.getElementById('compareMethod1').textContent = statisticalResult.method; |
|
document.getElementById('compareOver1').textContent = statisticalResult.over.toFixed(2) + '%'; |
|
document.getElementById('compareUnder1').textContent = statisticalResult.under.toFixed(2) + '%'; |
|
|
|
document.getElementById('compareMethod2').textContent = 'No saved no-vig results'; |
|
document.getElementById('compareOver2').textContent = '--%'; |
|
document.getElementById('compareUnder2').textContent = '--%'; |
|
|
|
document.getElementById('overDiff').textContent = '--%'; |
|
document.getElementById('underDiff').textContent = '--%'; |
|
document.getElementById('recommendation').textContent = 'Save no-vig results to compare'; |
|
} |
|
} |
|
}); |
|
</script> |
|
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=LMLK/advanced-player-prop-calculator" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> |
|
</html> |