12,820,077 members (23,820 online)
alternative version

#### Stats

135.4K views
20 bookmarked
Posted 16 Apr 2004

# Is CodeProject's Voting system really smart?

, 25 Apr 2004 CPOL
 Rate this:
In this article I continue my discussion of the CodeProject''s voting system.

## Introduction

This is a sequel of the article called "CodeProject's Article voting system" in which I have discussed two voting models, one of which I thought is used on the CodeProject's website.

As far as I was corrected by Chris Maunder who provided me with the model that is really used, I have decided to analyze this model too.

In this article you will find the rating counting algorithm, the description of its model and then some analysis of it.

## Rating counting algorithm

The following description was cut and pasted from the following post "Excellent analysis. Unfortunately not quite correct":

Each article on CodeProject has associated with it a Vote Total (Vt), a Weight Total (Wt), and a number of votes (N). When a member votes, the system adds the weight of their vote (dependant on membership level) to Wt, and the rating itself multiplied by their weight to Vt. The rating of an article is then R = Vt / Wt.

If everyone has a weight of 1 then Wt = N, and R = Vt / N. Having differing weights, though, means that when a gold member (weight = 4) and bronze member (weight = 1) vote, the vote is weighted towards the gold:

Wt = 4 + 1 = 5
Vt = 4 x 5 + 1 x 1 = 21
R = 4.2

This is quite clear and looks very reasonable as each person has its weight in the system that depends on its status. But does it really works? An answer to this question along with the probability model will be given in the following sections.

## Voting probability model

In the algorithm described above we deal with two types of random variables:

• - the peoples' vote values
• - the person's weight in the system

Note that:

1. , , and are independent when and
2. , have the same distribution
3. , have the same distribution

Now we can represent the algorithm given above by the following formula:

In this formula index means that is the rating after the 'th vote. It is also obvious that is the weight of the person who put in the vote and thus voted with the value .

Let us now assume that we have the following mean values of our random variables:

,

It is well known from the probability theory that for two random variables and :

If they are independent then:

Now we are ready to calculate the following mean value :

(These calculations are trivial and self descriptive)

In other words and doesn't depend anyhow from weights of the persons who participated in the voting!

It is also interesting to note that if the rating formula would be the following:

then the mean value of the rating would be i.e. independent from vote values!

## Conclusions

In this article I have calculated the mean value of the rating that measures the quality of any article on CodeProject's website.

It was discovered that although the weight of each person in the system is taken into account in case when the vote and the weight are independent, the mean value of rating random variable doesn't depend on the weight. Even more, the mean value is also the same as the mean value for the two other voting models described in my previous article "CodeProject's Article voting system".

Note that if the vote values depend on person's weights then the rating mean value is different and involves the weights distribution. Thus this approach may be considered to be more general than simple approaches that do not involve weights.

## Share

 Instructor / Trainer Fontys Hogescholen Netherlands
A software architect, designer, and a researcher in formal methods, algorithms and tools. Bachelor and Masters degrees (with honors) in Theoretical Mathematics. PhD in Theoretical Computer Science. Nine (9), DBLP recognized, international research publications (http://tiny.cc/umwaux). Five (5) Codeproject articles (http://tiny.cc/qlwaux). Fiveteen (15) years of work experience in research, design and development of Verification Algorithms, Scientific Software, Embedded Systems and Web applications. Young, energetic, pragmatic, smart, quality demanding, proactive, and eager to take responsibility. Working to the fullest, used to solving large-scale multi-disciplinary problems targeting long-run goals. Looking for a new challenge in a field of research and technical leadership.

Experience with development processes: Waterfall model; V-model (Rational Unified Process); Agile (SCRUM)

Specialties:
* Doing formal and applied research in the field of System and Software Verification
* Acquiring information, sharing knowledge, lecturing, mentoring, motivating and evaluating people.
* Creating object oriented architectures and developing large scale projects.

Experience with tools:
ASD suite, Rational Rose, Borland Together, Eclipse, Rational Soda for Word, Idea, JBuilder4/5/6/7, jdk1.3-1.6, Ant 1.x.x, Make, WebSphere, Tomcat 3.x, Weblogic, MySQL, Matlab 6.5 SP13, Clear Case, Clear Quest, Microsoft Visio.

Experience with programming languages:
Java (5 years), C (5 years), C++ (4 years), UML (4 years), CSS (2 years), HTML (2 years), Modula2 (2 years), Oberon (2 years), Microsoft .NET C# (1.5 year, ASP), SQL (1 year), OQL (1 year), XML (1 years), CSH (1 years), EL-76 (1 year), Visual Basic .NET (0.5 years), Pick Basic (0.5 years), OCL (0.5 years), JSP (1 year), Scala (0.3 years)

Knowledge and use of Version Control Systems:
SVN, CVS, GIT, Clearcase, SCCS

## You may also be interested in...

 First PrevNext
 It is time for the next chalange Jacek Gajek6-Jan-12 3:16 Jacek Gajek 6-Jan-12 3:16
 True in a perfect world Chris Maunder30-Apr-07 6:22 Chris Maunder 30-Apr-07 6:22
 Re: True in a perfect world Ivan S Zapreev7-Aug-07 3:05 Ivan S Zapreev 7-Aug-07 3:05
 Re: True in a perfect world Jacek Gajek6-Jan-12 3:07 Jacek Gajek 6-Jan-12 3:07
 Open voting system! [modified] Mathieu Jacques16-Jan-07 8:43 Mathieu Jacques 16-Jan-07 8:43
 Re: Open voting system! Ivan S Zapreev7-Aug-07 3:02 Ivan S Zapreev 7-Aug-07 3:02
 Mandatory message for each vote Mathieu Jacques16-Jan-07 8:35 Mathieu Jacques 16-Jan-07 8:35
 Different Distributions Sam NG20-Mar-06 20:06 Sam NG 20-Mar-06 20:06
 Re: Different Distributions Ivan S Zapreev21-Mar-06 6:49 Ivan S Zapreev 21-Mar-06 6:49
 I'd like to see the rating distribution reinux7-Sep-05 18:37 reinux 7-Sep-05 18:37
 Re: I'd like to see the rating distribution Ivan S Zapreev7-Sep-05 23:25 Ivan S Zapreev 7-Sep-05 23:25
 Re: I'd like to see the rating distribution Mathieu Jacques16-Jan-07 8:22 Mathieu Jacques 16-Jan-07 8:22
 The Yea/Nea/Meh Model Christopher Lord26-Apr-04 9:37 Christopher Lord 26-Apr-04 9:37
 Rookie/Guru Wackatronic26-Apr-04 9:06 Wackatronic 26-Apr-04 9:06
 Re: Rookie/Guru Jeff Varszegi26-Apr-04 9:25 Jeff Varszegi 26-Apr-04 9:25
 Re: Rookie/Guru Wackatronic26-Apr-04 10:01 Wackatronic 26-Apr-04 10:01
 Re: Rookie/Guru Jeff Varszegi26-Apr-04 10:27 Jeff Varszegi 26-Apr-04 10:27
 Re: Rookie/Guru Wackatronic26-Apr-04 10:34 Wackatronic 26-Apr-04 10:34
 Re: Rookie/Guru Jeff Varszegi26-Apr-04 10:40 Jeff Varszegi 26-Apr-04 10:40
 Re: Rookie/Guru Wackatronic26-Apr-04 12:46 Wackatronic 26-Apr-04 12:46
 &#1077;&#1090;&#1080;&#1090;&#1100;. What an article. gevorg26-Apr-04 8:25 gevorg 26-Apr-04 8:25
 Re: &#1077;&#1090;&#1080;&#1090;&#1100;. What an article. Ivan S Zapreev26-Apr-04 23:47 Ivan S Zapreev 26-Apr-04 23:47
 What a waste of time... ToneEngel26-Apr-04 2:39 ToneEngel 26-Apr-04 2:39
 Re: What a waste of time... Ivan S Zapreev26-Apr-04 2:47 Ivan S Zapreev 26-Apr-04 2:47
 Statistics? Luca Piccarreta26-Apr-04 2:24 Luca Piccarreta 26-Apr-04 2:24
 Re: Statistics? Ivan S Zapreev26-Apr-04 3:00 Ivan S Zapreev 26-Apr-04 3:00
 Movie rating and CodeProject’s Article rating Patrice Dargenton18-Apr-04 21:43 Patrice Dargenton 18-Apr-04 21:43
 Re: Movie rating and CodeProject’s Article rating Ivan S Zapreev18-Apr-04 22:14 Ivan S Zapreev 18-Apr-04 22:14
 Re: Movie rating and CodeProject’s Article rating Patrice Dargenton18-Apr-04 22:31 Patrice Dargenton 18-Apr-04 22:31
 Re: Movie rating and CodeProject’s Article rating Ivan S Zapreev19-Apr-04 0:07 Ivan S Zapreev 19-Apr-04 0:07
 Re: Movie rating and CodeProject’s Article rating Christopher Lord26-Apr-04 9:07 Christopher Lord 26-Apr-04 9:07
 Re: Movie rating and CodeProject’s Article rating Patrice Dargenton27-Apr-04 21:27 Patrice Dargenton 27-Apr-04 21:27
 Re: Movie rating and CodeProject’s Article rating Patrice Dargenton27-Apr-04 21:40 Patrice Dargenton 27-Apr-04 21:40
 Re: About the bad use of stats Ivan S Zapreev18-Apr-04 6:42 Ivan S Zapreev 18-Apr-04 6:42
 Re: About the bad use of stats Ivan S Zapreev18-Apr-04 7:30 Ivan S Zapreev 18-Apr-04 7:30
 Re: About the bad use of stats minox29-Apr-04 15:13 minox 29-Apr-04 15:13
 Incorrectness by counterexample. John Theal17-Apr-04 23:19 John Theal 17-Apr-04 23:19
 Re: Incorrectness by counterexample. Ivan S Zapreev18-Apr-04 6:01 Ivan S Zapreev 18-Apr-04 6:01
 Re: Incorrectness by counterexample. John Theal18-Apr-04 8:11 John Theal 18-Apr-04 8:11
 Re: Incorrectness by counterexample. Ivan S Zapreev18-Apr-04 8:40 Ivan S Zapreev 18-Apr-04 8:40
 Not a critique, but Michael Dunn17-Apr-04 15:59 Michael Dunn 17-Apr-04 15:59
 Re: Not a critique, but Ivan S Zapreev18-Apr-04 5:20 Ivan S Zapreev 18-Apr-04 5:20
 Circular Argument. John Theal17-Apr-04 9:42 John Theal 17-Apr-04 9:42
 Re: Circular Argument. leppie17-Apr-04 13:08 leppie 17-Apr-04 13:08
 Re: Circular Argument. Ivan S Zapreev18-Apr-04 5:14 Ivan S Zapreev 18-Apr-04 5:14
 Re: Circular Argument. John Theal18-Apr-04 8:16 John Theal 18-Apr-04 8:16
 Re: Circular Argument. Ivan S Zapreev18-Apr-04 22:11 Ivan S Zapreev 18-Apr-04 22:11
 Huh???? interj17-Apr-04 8:17 interj 17-Apr-04 8:17
 Re: Huh???? Ivan S Zapreev17-Apr-04 8:34 Ivan S Zapreev 17-Apr-04 8:34
 Last Visit: 31-Dec-99 19:00     Last Update: 25-Mar-17 15:31 Refresh 12 Next »