Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- To calculate a useful winning percentage, to avoid 1/1 showing 100% and being better than 999/1000
- (# of games won + 1) / (# of games played + 2)
- Average score = [Score from Amazon] / ([Total # of reviews] / [# of Amazon reviews]) + [Score from Goodreads] / ([Total # of reviews] / [# of Goodreads reviews])
- function GetRating( positiveVotes, negativeVotes ) {
- const totalVotes = positiveVotes + negativeVotes;
- const average = positiveVotes / totalVotes;
- const score = average - ( average - 0.5 ) * Math.pow( 2, -Math.log10( totalVotes + 1 ) );
- return score * 100;
- }
- There are three attempts (all will be taken individually).
- 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?
- A: Probability of winning is probability of not losing all three: 1 - (1 - 0.6)(1 - 0.3)(1 - 0.75)
- Regression Trendline #1
- Calculating the Slope (m) of the Trendline
- 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.
- Let a equal n times the summation of all x-values multiplied by their corresponding y-values, like so:
- a = 3 * {(1 * 3) +( 2 * 5) + (3 * 6.5)} = 97.5
- Let b equal the sum of all x-values times the sum of all y-values, like so:
- b = (1 + 2 + 3) * (3 + 5 + 6.5) = 87
- Let c equal n times the sum of all squared x-values, like so:
- c = 3 * (1^2 + 2^2 + 3^2) = 42
- Let d equal the squared sum of all x-values, like so:
- d = (1 + 2 + 3)^2 = 36
- 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:
- slope = m = (a - b) / (c - d) = (97.5 - 87) / (42 - 36) = 10.5 / 6 = 1.75
- Calculating the y-intercept (b) of the Trendline
- Consider the same data set.
- Let e equal the sum of all y-values, like so:
- e = (3 + 5 + 6.5) = 14.5
- Let f equal the slope times the sum of all x-values, like so:
- f = 1.75 * (1 + 2 + 3) = 10.5
- Plug the values you have calculated for e and f into the following equation for the y-intercept, b, of the trendline:
- y-intercept = b = (e - f) / n = (14.5 - 10.5) / 3 = 1.3
- Plug your values for m and b into a linear equation to reveal the final trendline equation:
- Trendline equation: y = 1.75x + 1.3
- Regression Trendline #2
- SUBJECT AGE X GLUCOSE LEVEL Y XY X2 Y2
- 1 43 99 4257 1849 9801
- 2 21 65 1365 441 4225
- 3 25 79 1975 625 6241
- 4 42 75 3150 1764 5625
- 5 57 87 4959 3249 7569
- 6 59 81 4779 3481 6561
- Σ 247 486 20485 11409 40022
- From the above table, Σx = 247, Σy = 486, Σxy = 20485, Σx2 = 11409, Σy2 = 40022. n is the sample size (6, in our case).
- Step 2: Use the following equations to find a and b where n is the same size (in this case 6).
- a = (((Σy)*(Σ(x^2))) - ((Σx)*(Σx*y))) / (n*(Σ(x^2)) - ((Σx)^2))
- b = ((n*(Σx*y)) - ((Σx)*(Σy))) / (n*(Σ(x^2)) - ((Σx)^2))
- a = 65.1416
- b = .385225
- Find a:
- ((486 × 11,409) – ((247 × 20,485)) / 6 (11,409) – 2472)
- 484979 / 7445
- =65.14
- Find b:
- (6(20,485) – (247 × 486)) / (6 (11409) – 2472)
- (122,910 – 120,042) / 68,454 – 2472
- 2,868 / 7,445
- = .385225
- Step 3: Insert the values into the equation.
- y’ = a + bx
- y’ = 65.14 + .385225x
- 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