不同 p值時,虛無假設與對立假設下的密度分布
https://poe.com/preview/9or7DmjGwEEGW6nZWcA1 import React, { useState } from 'react'; import { LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend } from 'recharts'; const PValueDistribution = () => { const [power, setPower] = useState(0.8); const [alpha, setAlpha] = useState(0.05); const data = []; const lambda = -Math.log(1 - power) / alpha; for (let x = 0; x <= 1; x += 0.01) { data.push({ pValue: x, null: 1, alt: Math.exp(-x * lambda) * lambda / (1 - Math.exp(-lambda)) }); } return ( <div className="p-4 max-w-4xl mx-auto"> <div className="text-center mb-6"> ...