Brain cramp on this averaging

  • Thread starter DaveC426913
  • Start date
  • Tags
    Brain
In summary: Dave are discussing how to calculate the average rating for movies on Dave's website. Integral suggests using the formula \overline{s}=\sum n_is_i/\sum n_i, which calculates the average by dividing the sum of all the ratings by the total number of ratings. Dave is concerned about this method "biasing" the average towards higher numbers, but Integral explains that this is not the case and provides an example to illustrate. Dave then shares his confusion and Integral clarifies the formula further. They also discuss Dave's code and how it has been giving him the correct average all along. Dave shares a link to his website and mentions that he is proud of it.
  • #1
DaveC426913
Gold Member
22,480
6,147
My website posts my movie reviews and rates them from 1 - 5. I want to post an average*, and I can't figure out how to do it.

Rating Number of movies
1....6
2...10
3...41
4...37
5...12

I can't figure out how to average* them without biasing them in favour of the higher numbers.

(*by average, I mean I should get approx 3.? / 5 .)
 
Mathematics news on Phys.org
  • #2
When I average them out I get about 3.36 which I would think is approximately 3.
 
  • #3
dunno why this is a problem. avg. is
[tex]\overline{s}=\sum n_is_i/\sum n_i[/tex]
This doesn't "bias" to high scores: consider if you had 6 1's and 6 5's and nothing else. You would get avg.=(1*6+5*6)/(1+5)=3 exactly as expected, so what do you mean by this "bias"?
 
  • #4
krab said:
dunno why this is a problem. avg. is
[tex]\overline{s}=\sum n_is_i/\sum n_i[/tex]
This doesn't "bias" to high scores: consider if you had 6 1's and 6 5's and nothing else. You would get avg.=(1*6+5*6)/(1+5)=3 exactly as expected, so what do you mean by this "bias"?

This is where I am confused.

What do you mean by "bias"?
 
  • #5
OK, so


(5*12)+(4*37)+(3*41)+(2+10)+(1*6) = 357
1+2+3+4+5 = 15

357/15 = 23.8
 
  • #6
Oh.

Oh.

It's just 357 / 107.

Duh.
 
  • #7
DaveC426913 said:
OK, so
(5*12)+(4*37)+(3*41)+(2+10)+(1*6) = 357
1+2+3+4+5 = 15
357/15 = 23.8
Don't divide by the sum of the "choices" divide by the number of total ratings

ie. ((6*1)+(10*2)+(41*3)+(37*4)+(12*5))/(6+10+41+37+12) which is about 3.36
 
  • #8
I've had it right all along and I keep second-guesing my code. (This is not even the first time I've tried to "fix" it.)

It's been saying 3.3 for a long time now, but that's not because it's "stuck" or broken, that's because 3.3 *is* the point of convergence, and subsequent entries are strongly averaging around it.

BTW, for those interested, my reviews and ratings page is http://www.davesbrain.ca/reviews.php" . It is database driven, and I am rather proud of it.
 
Last edited by a moderator:
  • #9
Last edited by a moderator:

1. What is a brain cramp?

A brain cramp, also known as a mental block or a brain freeze, refers to a temporary loss of concentration or mental clarity, often causing difficulty in performing a task or recalling information.

2. What is averaging in the context of a brain cramp?

In the context of a brain cramp, averaging refers to the process of taking the average of a set of data points or numbers. This can be used to analyze and compare the performance of an individual over a period of time.

3. How does a brain cramp affect the process of averaging?

A brain cramp can affect the process of averaging by causing a disruption in concentration or memory, leading to errors or inconsistencies in the data being averaged. It can also cause delays or difficulties in performing the necessary calculations.

4. What are some common causes of brain cramps during averaging?

Some common causes of brain cramps during averaging include fatigue, stress, distractions, and lack of familiarity with the task or data being analyzed. It can also be caused by external factors such as noise or interruptions.

5. How can brain cramps during averaging be minimized or prevented?

To minimize or prevent brain cramps during averaging, it is important to create a conducive environment for concentration, minimize distractions, and take regular breaks to rest and recharge. It can also be helpful to practice the task or familiarize oneself with the data beforehand to improve accuracy and speed.

Similar threads

  • General Math
Replies
8
Views
1K
  • General Math
Replies
3
Views
1K
  • General Math
Replies
3
Views
309
  • General Math
Replies
2
Views
1K
Replies
2
Views
1K
  • General Math
Replies
2
Views
2K
  • General Math
Replies
1
Views
1K
Replies
1
Views
2K
Replies
11
Views
2K
Replies
2
Views
2K
Back
Top