Tag Info

Compute the Median

Python 2, 48 bytes An unnamed function which returns the result. -1 byte thanks to xnor. lambda l:l.sort()or(l[len(l)/2]+l[~len(l)/2])/2. The first step is ...
• 14.7k

Compute the Median

Python3 - 31 30 bytes Saved a byte thanks to @Dennis! I wasn't planning on a builtin answer, but I found this module and thought it was really cool cuz I had no idea it existed. ...
• 25.7k
Accepted

Mean bits: an average challenge

Pyth, 6 bytes .Oml.B Try it online here. ...
• 25.7k

Approximate when you are going to die

JavaScript (ES6), Score:  59.51  59.10 L = 52 bytes, M ≈ 0.1150638 Expects (n)(m), where m is 1 for Male or 0 for Female. ...
• 194k

Approximate when you are going to die

R, score=67.47 47.92 30 bytes, MSE = 0.54587 -1 byte (and -1.47 in score) thanks to Dominic van Essen. pnorm(scan(),31,41,F)*scan()-2 Try it online! The input ...
• 15.6k

Sniff out biased random permutations

Python 3, 45 43 bytes (−2 bytes from xnor) lambda v:sum(r<r[-1:]for r in v)/len(v)>.51 Try it online! How it works Computes the fraction of samples where ...
• 39.7k

• 68.8k

Frequency Distribution of Mixed Dice Rolls

Jelly,  14  7 bytes -3 bytes thanks to Mr. Xcoder (use of an implicit range to avoid leading R; replacement of reduce by the dyadic Cartesian product and ...
• 108k