Advertisement
TheCodingKid

Useful Scoring/Percentage Formulas

May 21st, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. To calculate a useful winning percentage, to avoid 1/1 showing 100% and being better than 999/1000
  2. (# of games won + 1) / (# of games played + 2)
  3.  
  4.  
  5.  
  6. Average score = [Score from Amazon] / ([Total # of reviews] / [# of Amazon reviews]) + [Score from Goodreads] / ([Total # of reviews] / [# of Goodreads reviews])
  7.  
  8.  
  9. function GetRating( positiveVotes, negativeVotes ) {
  10. const totalVotes = positiveVotes + negativeVotes;
  11. const average = positiveVotes / totalVotes;
  12. const score = average - ( average - 0.5 ) * Math.pow( 2, -Math.log10( totalVotes + 1 ) );
  13.  
  14. return score * 100;
  15. }
  16.  
  17.  
  18.  
  19. There are three attempts (all will be taken individually).
  20.  
  21. The first is known to have a 60% success rate. The second is known to have a 30% success rate. The third is known to have a 75% success rate. What are the odds of a success occurring if all three attempts are made?
  22.  
  23. A: Probability of winning is probability of not losing all three: 1 - (1 - 0.6)(1 - 0.3)(1 - 0.75)
  24.  
  25.  
  26.  
  27. Regression Trendline #1
  28. Calculating the Slope (m) of the Trendline
  29. Consider this data set of three (x,y) points: (1,3) (2, 5) (3,6.5). Let n = the number of data points, in this case 3.
  30.  
  31. Let a equal n times the summation of all x-values multiplied by their corresponding y-values, like so:
  32. a = 3 * {(1 * 3) +( 2 * 5) + (3 * 6.5)} = 97.5
  33.  
  34. Let b equal the sum of all x-values times the sum of all y-values, like so:
  35. b = (1 + 2 + 3) * (3 + 5 + 6.5) = 87
  36.  
  37. Let c equal n times the sum of all squared x-values, like so:
  38. c = 3 * (1^2 + 2^2 + 3^2) = 42
  39.  
  40. Let d equal the squared sum of all x-values, like so:
  41. d = (1 + 2 + 3)^2 = 36
  42.  
  43. Plug the values that you calculated for a, b, c, and d into the following equation to calculate the slope, m, of the regression line:
  44. slope = m = (a - b) / (c - d) = (97.5 - 87) / (42 - 36) = 10.5 / 6 = 1.75
  45.  
  46. Calculating the y-intercept (b) of the Trendline
  47. Consider the same data set.
  48.  
  49. Let e equal the sum of all y-values, like so:
  50. e = (3 + 5 + 6.5) = 14.5
  51.  
  52. Let f equal the slope times the sum of all x-values, like so:
  53. f = 1.75 * (1 + 2 + 3) = 10.5
  54.  
  55. Plug the values you have calculated for e and f into the following equation for the y-intercept, b, of the trendline:
  56. y-intercept = b = (e - f) / n = (14.5 - 10.5) / 3 = 1.3
  57.  
  58. Plug your values for m and b into a linear equation to reveal the final trendline equation:
  59. Trendline equation: y = 1.75x + 1.3
  60.  
  61.  
  62. Regression Trendline #2
  63. SUBJECT AGE X GLUCOSE LEVEL Y XY X2 Y2
  64. 1 43 99 4257 1849 9801
  65. 2 21 65 1365 441 4225
  66. 3 25 79 1975 625 6241
  67. 4 42 75 3150 1764 5625
  68. 5 57 87 4959 3249 7569
  69. 6 59 81 4779 3481 6561
  70. Σ 247 486 20485 11409 40022
  71. From the above table, Σx = 247, Σy = 486, Σxy = 20485, Σx2 = 11409, Σy2 = 40022. n is the sample size (6, in our case).
  72.  
  73. Step 2: Use the following equations to find a and b where n is the same size (in this case 6).
  74. a = (((Σy)*(Σ(x^2))) - ((Σx)*(Σx*y))) / (n*(Σ(x^2)) - ((Σx)^2))
  75. b = ((n*(Σx*y)) - ((Σx)*(Σy))) / (n*(Σ(x^2)) - ((Σx)^2))
  76.  
  77. a = 65.1416
  78. b = .385225
  79.  
  80.  
  81. Find a:
  82. ((486 × 11,409) – ((247 × 20,485)) / 6 (11,409) – 2472)
  83. 484979 / 7445
  84. =65.14
  85.  
  86. Find b:
  87. (6(20,485) – (247 × 486)) / (6 (11409) – 2472)
  88. (122,910 – 120,042) / 68,454 – 2472
  89. 2,868 / 7,445
  90. = .385225
  91.  
  92. Step 3: Insert the values into the equation.
  93. y’ = a + bx
  94. y’ = 65.14 + .385225x
  95.  
  96.  
  97. Wolfram Alpha derive quadratic equation from plots - equation {508,410}{595,370}{301,490}{175,520} or quadratic {508,410}{595,370}{301,490}{175,520}{190,520}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement