这是一个有趣的统计相关问题。
我有什么
我的追求
例如,平均值为10.3。 1-20。发生4的机会是什么?我需要使用10.3作为权重,因为如果没有,那么每次发生的可能性都为1/20
是否有类似这样的统计公式?
编码
public void ReboundFormula(double TeamRebound, double OTeamRebound, double OffensiveRebound, double DefensiveRebound,
double ShotsTotalAverage, double OShotsTotalAverage, double TeamShotAveragePercent, double OTeamShotAveragePercent,
double PlayerORebound, double PlayerDRebound, double PlayerOPercentRebound, double PlayerDPercentRebound)
{
//Possible rebounds using amount of shots that "miss" which result in a rebound chance. Note fouls, ball going out of bounds
//, or other event that causes a rebound to not occur on a missed shot
predictedPossibleRebounds = (ShotsTotalAverage*(1 -(double) TeamShotAveragePercent/100)) + OShotsTotalAverage*(1 - (double) TeamShotAveragePercent/100);
Temp = (double) TeamRebound/(TeamRebound+OTeamRebound);
Temp2 = (double) OTeamRebound/(TeamRebound+OTeamRebound);
System.out.println("Percent of Team 1 Rebounds: " + Temp + " | Percent of Team 2 Rebound: " + Temp2);
System.out.println();
//Predicted rebounds a team will grab of the amount of rebounds they will likely get
predictedTeamRebound = (double) predictedPossibleRebounds*Temp;
predictedOTeamRebound = (double) predictedPossibleRebounds*Temp2;
System.out.println("Amount of Rebounds to Team: " + predictedTeamRebound + " | Amount of Rebounds to OTeam: " + predictedOTeamRebound);
System.out.println();
//Rebounds predicted to be grabbed by teams
Oratio = ((double) OffensiveRebound/TeamRebound)*predictedTeamRebound;
Dratio = ((double) DefensiveRebound/TeamRebound)*predictedTeamRebound;
System.out.println("Amount of Offensive Rebounds: " + Oratio + " | Amount of Defensive Rebounds: " + Dratio);
System.out.println();
System.out.println("Predicted Rebounds: " + predictedPossibleRebounds + " | Player Offensive Percent: " + PlayerOPercentRebound + " | Player Defensive Percent: " + PlayerDPercentRebound);
//Player data time
Temp = (Oratio*(PlayerOPercentRebound/100)) + (Dratio*(PlayerDPercentRebound/100));
System.out.println();
System.out.println("Player Predicted Rebound Total: " + Temp + " | Player Rebound Total Average: " + (PlayerORebound+PlayerDRebound) );
System.out.println();
System.out.println( " " + (int) Math.round((Temp) - (Temp*0.75)) + " " + (int) Math.round((Temp) - (Temp*0.5)) + " " + (int) Math.round((Temp) - (Temp*0.25)) + " " + (int) Math.round((Temp) - (Temp*0.1)) + " " + (Temp)
+ " " + (int) Math.round((Temp) + (Temp*0.1)) + " " + (int) Math.round((Temp) + (Temp*0.25)) + " " + (int) Math.round((Temp) + (Temp*0.5)) + " " + (int) Math.round((Temp) + (Temp*0.75)));
System.out.println("-75% -50% -25% -10% Predicted Average +10% +25% +50% +75%");
System.out.println();
进料数据
run.ReboundFormula(54, 48.2, 13.662, 40.338, 89.86, 87.06, 45.2, 45.7, 3.7, 6.2, 12.9, 22.8);
答案 0 :(得分:0)
您需要指定结果的分布。仅指定平均值和范围是不够的。例如,一个不平衡的骰子有1/12的机会阅读1和3/12的阅读机会5,其他结果具有相同的可能性,则平均为3.83。但是,也可以使用具有相同平均值的其他不平衡骰子,例如,骰子有1/12的机会读取2和3/12的机会读取6。
我怀疑您想要的是binomial distribution.的二项式分布是由有限数量的离散试验(如程序的反弹次数)产生的,每个试验成功或失败,每个等重的试验。
如果您单击链接,将会看到很多公式,可能比您想要的要多,但是一个原理是公式的基础,而该原理是您主要要掌握的。那并不是那么容易,但是一旦掌握了原理,自然就会遵循主要的公式。