savageorange comments on Polling Thread - Less Wrong

5 Post author: Gunnar_Zarncke 01 March 2014 11:57PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (24)

You are viewing a single comment's thread. Show more comments above.

Comment author: savageorange 02 March 2014 12:17:50AM *  2 points [-]

I'd be a lot more inclined to respond to this if I didn't need to calculate probability values (ie. could input weights instead, which were then normalized.)

To that end, here is a simple Python script which normalizes a list of weights (given as commandline arguments) into a list of probabilities:

#!/usr/bin/python
import sys
weights = [float(v) for v in sys.argv[1:]]
total_w = sum(weights)
probs = [v / total_w for v in weights]
print ('Probabilities : %s' % (", ".join([str(v) for v in probs])))

Produces output like this:

Probabilities : 0.1, 0.2, 0.3, 0.4
Comment author: Dagon 02 March 2014 12:46:35PM 2 points [-]

Useful script, but I'm not sure it's necessary for this question. These aren't exclusive or compared to each other. Each probability is independent, "likelihood that this topic will fit into lesswrong expectations".