Related Articles
The concept of Social Computing in Python
• Last Updated : 19 Feb, 2020

Here comes the concept of Social computing which many sites like Quora, StackOverflow, etc use.

#### Wisdom of crowds

According to the concept of the wisdom of crowds, when many people guess about a thing then there is a probability that they have guessed it right. This is because some people may have underestimated it and some may have overestimated it, so it’s mean comes to be near about the exact answer.

It is based on the fact that Underestimation cancels the overestimation part.

Calculation of trimmed mean:

• Calculate 10% of the total crowd.
• Remove that number of calculated values from the list i.e., 10% of underestimated values and 10% of overestimated values.
• Now calculate the mean.

Below is the implementation.

 `# Python porgram to demonstrate ` `# social computing ` ` `  ` `  `from` `statistics ``import` `mean ` ` `  `# Estimation provided by various ` `# users ` `Estimates ``=` `[``1000``, ``1010``, ``1223``, ``52223``, ``2411``, ` `             ``322``, ``563``, ``1246``, ``1000``, ``2333``, ``4666``, ``2133``] ` ` `  `Estimates.sort() ` ` `  `tv ``=` `int``(``0.1` `*` `len``(Estimates)) ` ` `  `# Removing Underestimating value ` `Estimates ``=` `Estimates[tv:] ` ` `  `# Removing overestimating value ` `Estimates ``=` `Estimates[:``len``(Estimates)``-``tv] ` ` `  ` `  `print``(mean(Estimates)) `

Output:

`1758.5`

Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :