Our thinking

Generating a smart NCAA bracket

17 March 2014

The NCAA tournament is notoriously difficult to predict. So difficult, in fact, that you can win a billion dollars for doing so.

While perfection may be out of reach, it is possible to be smarter about your predictions. Today, Nate Silver launched his new website FiveThirtyEight and in the launch offered up his bracket predictions.

Today I also stumbled upon Coder’s Bracket, a site that will automatically generate a bracket based on any function provided.

It only seemed natural to combine these two sites, using Nate Silver’s data to power the bracket generator. I extracted the data from FiveThirtyEight and modified it to match the Coder’s Bracket functions. The result is a function that will generate a random bracket using the percentages calculated by Nate Silver.

Copy the code below into the Coder’s Bracket template (left hand side of the link) to start creating your own Nate Silver-approved randomly generated brackets:

function (game, team1, team2) {
  var data = [{team_id:"57",team_name:"Florida",team_seed:"1",team_region:"South",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.988190851712",rd3_win:"0.839462623313",rd4_win:"0.624440733740",rd5_win:"0.410978179192",rd6_win:"0.260928522050",rd7_win:"0.144572206116",win_odds:"5.916958846"},{team_id:"399",team_name:"Albany",team_seed:"16a",team_region:"South",playin_flag:"1",team_alive:"1",rd1_win:"0.523123750696",rd2_win:"0.006667110139",rd3_win:"0.001134559423",rd4_win:"0.000159823308",rd5_win:"0.000018409608",rd6_win:"0.000002282502",rd7_win:"0.000000239125",win_odds:"4181911.466"},{team_id:"116",team_name:"Mount St. Mary's",team_seed:"16b",team_region:"South",playin_flag:"1",team_alive:"1",rd1_win:"0.476876249304",rd2_win:"0.005142038149",rd3_win:"0.000801382175",rd4_win:"0.000103198835",rd5_win:"0.000010888019",rd6_win:"0.000001224242",rd7_win:"0.000000116644",win_odds:"8573095.723"},{team_id:"38",team_name:"Colorado",team_seed:"8",team_region:"South",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.275715272033",rd3_win:"0.022416391403",rd4_win:"0.007759465004",rd5_win:"0.002202951214",rd6_win:"0.000698753811",rd7_win:"0.000185843753",win_odds:"5379.864219"},{team_id:"221",team_name:"Pittsburgh",team_seed:"9",team_region:"South",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.724284727967",rd3_win:"0.136185043685",rd4_win:"0.070576973526",rd5_win:"0.030730659880",rd6_win:"0.012877665119",rd7_win:"0.004548961741",win_odds:"218.8303826"},{team_id:"2670",team_name:"VCU",team_seed:"5",team_region:"South",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.764132213407",rd3_win:"0.286663248967",rd4_win:"0.095683188813",rd5_win:"0.044995878712",rd6_win:"0.020483954735",rd7_win:"0.007898738436",win_odds:"125.6024958"},{team_id:"2617",team_name:"Stephen F. Austin",team_seed:"12",team_region:"South",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.235867786593",rd3_win:"0.041831022382",rd4_win:"0.006237463449",rd5_win:"0.001588711191",rd6_win:"0.000469211128",rd7_win:"0.000116038196",win_odds:"8616.851988"},{team_id:"26",team_name:"UCLA",team_seed:"4",team_region:"South",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.870759407024",rd3_win:"0.626921550372",rd4_win:"0.187818722511",rd5_win:"0.081204410382",rd6_win:"0.037373099152",rd7_win:"0.014542836154",win_odds:"67.76237822"},{team_id:"202",team_name:"Tulsa",team_seed:"13",team_region:"South",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.129240592976",rd3_win:"0.044584178278",rd4_win:"0.007220430814",rd5_win:"0.001962353389",rd6_win:"0.000595274875",rd7_win:"0.000151280416",win_odds:"6609.240941"},{team_id:"194",team_name:"Ohio St.",team_seed:"6",team_region:"South",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.753055786951",rd3_win:"0.400774931660",rd4_win:"0.199897912862",rd5_win:"0.085815078689",rd6_win:"0.041491999892",rd7_win:"0.017045129440",win_odds:"57.66778563"},{team_id:"2168",team_name:"Dayton",team_seed:"11",team_region:"South",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.246944213049",rd3_win:"0.076264790353",rd4_win:"0.022848595023",rd5_win:"0.005736489237",rd6_win:"0.001735349317",rd7_win:"0.000438114498",win_odds:"2281.508352"},{team_id:"183",team_name:"Syracuse",team_seed:"3",team_region:"South",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.886092464154",rd3_win:"0.501449763387",rd4_win:"0.225549382025",rd5_win:"0.086459002941",rd6_win:"0.038538705988",rd7_win:"0.014486038054",win_odds:"68.03198765"},{team_id:"2711",team_name:"Western Michigan",team_seed:"14",team_region:"South",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.113907535846",rd3_win:"0.021510514600",rd4_win:"0.003662998742",rd5_win:"0.000515751757",rd6_win:"0.000096160658",rd7_win:"0.000014929995",win_odds:"66978.25854"},{team_id:"167",team_name:"New Mexico",team_seed:"7",team_region:"South",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.637537835827",rd3_win:"0.221612021956",rd4_win:"0.097308000294",rd5_win:"0.032255299524",rd6_win:"0.014227577533",rd7_win:"0.005310375617",win_odds:"187.3105965"},{team_id:"24",team_name:"Stanford",team_seed:"10",team_region:"South",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.362462164173",rd3_win:"0.089184577130",rd4_win:"0.029151457762",rd5_win:"0.007007829532",rd6_win:"0.002336488767",rd7_win:"0.000652180907",win_odds:"1532.316891"},{team_id:"2305",team_name:"Kansas",team_seed:"2",team_region:"South",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.924028935551",rd3_win:"0.670385180717",rd4_win:"0.418241229491",rd5_win:"0.208093218104",rd6_win:"0.122254876912",rd7_win:"0.062121880281",win_odds:"15.09738784"},{team_id:"2198",team_name:"Eastern Kentucky",team_seed:"15",team_region:"South",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.075971064449",rd3_win:"0.018818220196",rd4_win:"0.003340423802",rd5_win:"0.000424888630",rd6_win:"0.000069522438",rd7_win:"0.000009473384",win_odds:"105557.8966"},{team_id:"258",team_name:"Virginia",team_seed:"1",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.963891640710",rd3_win:"0.707824942042",rd4_win:"0.389037006431",rd5_win:"0.232728314990",rd6_win:"0.120747847136",rd7_win:"0.060120333651",win_odds:"15.63330756"},{team_id:"324",team_name:"Coastal Carolina",team_seed:"16",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.036108359290",rd3_win:"0.005669669617",rd4_win:"0.000409048003",rd5_win:"0.000041185075",rd6_win:"0.000003066781",rd7_win:"0.000000248445",win_odds:"4025032.865"},{team_id:"235",team_name:"Memphis",team_seed:"8",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.550041201202",rd3_win:"0.166598236998",rd4_win:"0.059135920332",rd5_win:"0.024241659270",rd6_win:"0.008323000988",rd7_win:"0.002790259585",win_odds:"357.3895941"},{team_id:"45",team_name:"George Washington",team_seed:"9",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.449958798798",rd3_win:"0.119907151343",rd4_win:"0.035913469028",rd5_win:"0.012695265109",rd6_win:"0.003296652472",rd7_win:"0.000847544577",win_odds:"1178.878944"},{team_id:"2132",team_name:"Cincinnati",team_seed:"5",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.580155795456",rd3_win:"0.194839106492",rd4_win:"0.078596406322",rd5_win:"0.034733779641",rd6_win:"0.012335484220",rd7_win:"0.004266692214",win_odds:"233.3735967"},{team_id:"108",team_name:"Harvard",team_seed:"12",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.419844204544",rd3_win:"0.116069584345",rd4_win:"0.042519017342",rd5_win:"0.017246572846",rd6_win:"0.004873386216",rd7_win:"0.001356657530",win_odds:"736.1057015"},{team_id:"127",team_name:"Michigan St.",team_seed:"4",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.913682056616",rd3_win:"0.665932496917",rd4_win:"0.389793425352",rd5_win:"0.240432380094",rd6_win:"0.121783085526",rd7_win:"0.059205244082",win_odds:"15.8903957"},{team_id:"48",team_name:"Delaware",team_seed:"13",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.086317943384",rd3_win:"0.023158812247",rd4_win:"0.004595707190",rd5_win:"0.001073451977",rd6_win:"0.000175129233",rd7_win:"0.000029256989",win_odds:"34178.86725"},{team_id:"153",team_name:"UNC",team_seed:"6",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.679637367771",rd3_win:"0.363762160822",rd4_win:"0.158570533817",rd5_win:"0.063916335579",rd6_win:"0.023460936804",rd7_win:"0.008358534639",win_odds:"118.6381954"},{team_id:"2507",team_name:"Providence",team_seed:"11",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.320362632229",rd3_win:"0.121140229004",rd4_win:"0.038846850512",rd5_win:"0.011574816958",rd6_win:"0.002852073325",rd7_win:"0.000697863640",win_odds:"1431.944694"},{team_id:"66",team_name:"Iowa St.",team_seed:"3",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.812359445117",rd3_win:"0.463801514016",rd4_win:"0.203333849998",rd5_win:"0.082343934283",rd6_win:"0.032151734587",rd7_win:"0.012147762824",win_odds:"81.31968425"},{team_id:"2428",team_name:"NC Central",team_seed:"14",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.187640554883",rd3_win:"0.051296096158",rd4_win:"0.010147441688",rd5_win:"0.001890758731",rd6_win:"0.000328056096",rd7_win:"0.000057964655",win_odds:"17250.89246"},{team_id:"41",team_name:"Connecticut",team_seed:"7",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.673010096346",rd3_win:"0.263145195971",rd4_win:"0.141404339929",rd5_win:"0.057736802224",rd6_win:"0.019843621793",rd7_win:"0.006636521547",win_odds:"149.6813461"},{team_id:"2603",team_name:"St. Joseph's",team_seed:"10",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.326989903654",rd3_win:"0.083539258184",rd4_win:"0.032306717406",rd5_win:"0.009006541758",rd6_win:"0.002115820244",rd7_win:"0.000495158323",win_odds:"2018.556076"},{team_id:"222",team_name:"Villanova",team_seed:"2",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.947195368265",rd3_win:"0.644579937677",rd4_win:"0.413875184448",rd5_win:"0.210161420349",rd6_win:"0.093509341577",rd7_win:"0.039997493237",win_odds:"24.00156682"},{team_id:"270",team_name:"Wisconsin-Mil",team_seed:"15",team_region:"East",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.052804631735",rd3_win:"0.008735608167",rd4_win:"0.001515082202",rd5_win:"0.000176781117",rd6_win:"0.000020093880",rd7_win:"0.000002405526",win_odds:"415708.4549"},{team_id:"2724",team_name:"Wichita St.",team_seed:"1",team_region:"Midwest",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.978998826242",rd3_win:"0.593564472099",rd4_win:"0.242973453355",rd5_win:"0.135356515847",rd6_win:"0.079054415882",rd7_win:"0.045123904745",win_odds:"21.16120271"},{team_id:"13",team_name:"Cal Poly",team_seed:"16a",team_region:"Midwest",playin_flag:"1",team_alive:"1",rd1_win:"0.556026277314",rd2_win:"0.013065156744",rd3_win:"0.000908528698",rd4_win:"0.000038934419",rd5_win:"0.000003140567",rd6_win:"0.000000346346",rd7_win:"0.000000041694",win_odds:"23984320.92"},{team_id:"2640",team_name:"Texas Southern",team_seed:"16b",team_region:"Midwest",playin_flag:"1",team_alive:"1",rd1_win:"0.443973722686",rd2_win:"0.007936017015",rd3_win:"0.000451512969",rd4_win:"0.000015695114",rd5_win:"0.000001044930",rd6_win:"0.000000114885",rd7_win:"0.000000013845",win_odds:"72229245.3"},{team_id:"96",team_name:"Kentucky",team_seed:"8",team_region:"Midwest",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.739316299302",rd3_win:"0.339023986980",rd4_win:"0.140713068033",rd5_win:"0.079370373228",rd6_win:"0.039298843477",rd7_win:"0.019100746533",win_odds:"51.35397466"},{team_id:"2306",team_name:"Kansas St.",team_seed:"9",team_region:"Midwest",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.260683700698",rd3_win:"0.066051499254",rd4_win:"0.013637933661",rd5_win:"0.004405502163",rd6_win:"0.001542421430",rd7_win:"0.000540769508",win_odds:"1848.21669"},{team_id:"139",team_name:"St. Louis",team_seed:"5",team_region:"Midwest",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.576932201751",rd3_win:"0.120300922669",rd4_win:"0.041602009109",rd5_win:"0.016422235057",rd6_win:"0.006102291001",rd7_win:"0.002255247354",win_odds:"442.4103418"},{team_id:"152",team_name:"NC St.",team_seed:"12a",team_region:"Midwest",playin_flag:"1",team_alive:"1",rd1_win:"0.363083282455",rd2_win:"0.145666494439",rd3_win:"0.022644239491",rd4_win:"0.005182101168",rd5_win:"0.001447051279",rd6_win:"0.000383475156",rd7_win:"0.000103761650",win_odds:"9636.472025"},{team_id:"2752",team_name:"Xavier",team_seed:"12b",team_region:"Midwest",playin_flag:"1",team_alive:"1",rd1_win:"0.636916717545",rd2_win:"0.277401303810",rd3_win:"0.048221060702",rd4_win:"0.015320460501",rd5_win:"0.005647173884",rd6_win:"0.001729591562",rd7_win:"0.000534093728",win_odds:"1871.330544"},{team_id:"97",team_name:"Louisville",team_seed:"4",team_region:"Midwest",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.930702991238",rd3_win:"0.783265454610",rd4_win:"0.535887829637",rd5_win:"0.380677082925",rd6_win:"0.240834522630",rd7_win:"0.148566337043",win_odds:"5.730999901"},{team_id:"2363",team_name:"Manhattan",team_seed:"13",team_region:"Midwest",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.069297008762",rd3_win:"0.025568322529",rd4_win:"0.004628515003",rd5_win:"0.001054064705",rd6_win:"0.000226572992",rd7_win:"0.000050154310",win_odds:"19937.46595"},{team_id:"113",team_name:"Massachusetts",team_seed:"6",team_region:"Midwest",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.323742006064",rd3_win:"0.062344817951",rd4_win:"0.021060004974",rd5_win:"0.004107938534",rd6_win:"0.001140965097",rd7_win:"0.000320494379",win_odds:"3119.179525"},{team_id:"2294",team_name:"Iowa",team_seed:"11a",team_region:"Midwest",playin_flag:"1",team_alive:"1",rd1_win:"0.482780653330",rd2_win:"0.316287499496",rd3_win:"0.093957567939",rd4_win:"0.049025218662",rd5_win:"0.016781280385",rd6_win:"0.007467456453",rd7_win:"0.003289774255",win_odds:"302.972225"},{team_id:"2633",team_name:"Tennessee",team_seed:"11b",team_region:"Midwest",playin_flag:"1",team_alive:"1",rd1_win:"0.517219346670",rd2_win:"0.359970494440",rd3_win:"0.119936818979",rd4_win:"0.062067205914",rd5_win:"0.020994236892",rd6_win:"0.009044499598",rd7_win:"0.003858608988",win_odds:"258.1607502"},{team_id:"150",team_name:"Duke",team_seed:"3",team_region:"Midwest",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.929166050148",rd3_win:"0.704414883702",rd4_win:"0.428036238078",rd5_win:"0.179358346449",rd6_win:"0.091789194379",rd7_win:"0.045936222462",win_odds:"20.7693129"},{team_id:"2382",team_name:"Mercer",team_seed:"14",team_region:"Midwest",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.070833949852",rd3_win:"0.019345911428",rd4_win:"0.004409745650",rd5_win:"0.000533754592",rd6_win:"0.000108012950",rd7_win:"0.000022616400",win_odds:"44214.7017"},{team_id:"251",team_name:"Texas",team_seed:"7",team_region:"Midwest",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.501186611909",rd3_win:"0.126193997951",rd4_win:"0.032760844302",rd5_win:"0.006085899782",rd6_win:"0.002254733001",rd7_win:"0.000833414207",win_odds:"1198.883554"},{team_id:"9",team_name:"Arizona St.",team_seed:"10",team_region:"Midwest",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.498813388091",rd3_win:"0.125197836448",rd4_win:"0.031585174760",rd5_win:"0.005689933461",rd6_win:"0.001854972952",rd7_win:"0.000606640743",win_odds:"1647.422087"},{team_id:"130",team_name:"Michigan",team_seed:"2",team_region:"Midwest",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.953825882645",rd3_win:"0.738491521328",rd4_win:"0.370144597968",rd5_win:"0.142007923028",rd6_win:"0.063816377390",rd7_win:"0.028130649258",win_odds:"34.54841521"},{team_id:"2747",team_name:"Wofford",team_seed:"15",team_region:"Midwest",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.046174117355",rd3_win:"0.010116644273",rd4_win:"0.000910969693",rd5_win:"0.000056502290",rd6_win:"0.000006218794",rd7_win:"0.000000738493",win_odds:"1354108.091"},{team_id:"12",team_name:"Arizona",team_seed:"1",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.977695239703",rd3_win:"0.726876539487",rd4_win:"0.582411997103",rd5_win:"0.424121754328",rd6_win:"0.230825752208",rd7_win:"0.133549746409",win_odds:"6.487846491"},{team_id:"2692",team_name:"Weber St.",team_seed:"16",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.022304760297",rd3_win:"0.002656332371",rd4_win:"0.000568461552",rd5_win:"0.000093021487",rd6_win:"0.000008340969",rd7_win:"0.000001023039",win_odds:"977478.9735"},{team_id:"2250",team_name:"Gonzaga",team_seed:"8",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.479870068532",rd3_win:"0.126191039747",rd4_win:"0.077224202977",rd5_win:"0.040451180180",rd6_win:"0.014181218607",rd7_win:"0.005611937580",win_odds:"177.1915757"},{team_id:"197",team_name:"Oklahoma St.",team_seed:"9",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.520129931468",rd3_win:"0.144276088395",rd4_win:"0.089766975544",rd5_win:"0.047944924321",rd6_win:"0.022217258188",rd7_win:"0.011225530600",win_odds:"88.0826488"},{team_id:"201",team_name:"Oklahoma",team_seed:"5",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.637908924452",rd3_win:"0.333590025743",rd4_win:"0.076573283322",rd5_win:"0.031502789051",rd6_win:"0.011361434436",rd7_win:"0.004610733992",win_odds:"215.8852078"},{team_id:"2449",team_name:"North Dakota St.",team_seed:"12",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.362091075548",rd3_win:"0.145468572043",rd4_win:"0.019449384465",rd5_win:"0.005465534099",rd6_win:"0.001082309459",rd7_win:"0.000261583924",win_odds:"3821.864901"},{team_id:"21",team_name:"San Diego St.",team_seed:"4",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.734775656057",rd3_win:"0.425323189779",rd4_win:"0.141197305461",rd5_win:"0.074673154941",rd6_win:"0.021060906332",rd7_win:"0.006866943347",win_odds:"144.6252003"},{team_id:"166",team_name:"New Mexico St.",team_seed:"13",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.265224343943",rd3_win:"0.095618212435",rd4_win:"0.012808389576",rd5_win:"0.003610041722",rd6_win:"0.000678584820",rd7_win:"0.000157008372",win_odds:"6368.087131"},{team_id:"239",team_name:"Baylor",team_seed:"6",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.703236756559",rd3_win:"0.338121829667",rd4_win:"0.143490007441",rd5_win:"0.044286024681",rd6_win:"0.017880727266",rd7_win:"0.008002963436",win_odds:"123.9537135"},{team_id:"158",team_name:"Nebraska",team_seed:"11",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.296763243441",rd3_win:"0.091644802820",rd4_win:"0.029181695233",rd5_win:"0.006612233582",rd6_win:"0.001696542071",rd7_win:"0.000514024938",win_odds:"1944.430906"},{team_id:"156",team_name:"Creighton",team_seed:"3",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.882904585981",rd3_win:"0.543764419623",rd4_win:"0.296920210803",rd5_win:"0.122191625450",rd6_win:"0.054078980875",rd7_win:"0.026150582684",win_odds:"37.2400657"},{team_id:"309",team_name:"Louisiana-Lafayette",team_seed:"14",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.117095414019",rd3_win:"0.026468947890",rd4_win:"0.004215018662",rd5_win:"0.000466907512",rd6_win:"0.000070868762",rd7_win:"0.000013694656",win_odds:"73020.18403"},{team_id:"2483",team_name:"Oregon",team_seed:"7",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.647316513476",rd3_win:"0.191415757568",rd4_win:"0.098730522699",rd5_win:"0.035653377652",rd6_win:"0.011007541824",rd7_win:"0.003896041554",win_odds:"255.6707737"},{team_id:"252",team_name:"Brigham Young",team_seed:"10",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.352683486524",rd3_win:"0.069537751924",rd4_win:"0.026666605150",rd5_win:"0.006775909139",rd6_win:"0.001527992880",rd7_win:"0.000413340980",win_odds:"2418.310082"},{team_id:"275",team_name:"Wisconsin",team_seed:"2",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.928405221530",rd3_win:"0.718357824028",rd4_win:"0.397236060416",rd5_win:"0.155778562628",rd6_win:"0.065619792625",rd7_win:"0.030338653861",win_odds:"31.9612515"},{team_id:"44",team_name:"American",team_seed:"15",team_region:"West",playin_flag:"0",team_alive:"1",rd1_win:"1.000000000000",rd2_win:"0.071594778470",rd3_win:"0.020688666479",rd4_win:"0.003559879596",rd5_win:"0.000372959228",rd6_win:"0.000046722706",rd7_win:"0.000007636814",win_odds:"130943.6616"}]
  var random = Math.random()
  var data_point_1 = _.where(data, {team_name: team1.name})
  var round = 7 - game.round

  data_point_1 = data_point_1[0]
  var data_point_2 = _.where(data, {team_name: team2.name})
  data_point_2 = data_point_2[0]

  // Weight the percentage using the first team's percentage over the sum of both team's percentage to win that round
  sum = parseFloat(data_point_1["rd" + round + "_win"])+parseFloat(data_point_2["rd" + round + "_win"])
  weighted_percentage = data_point_1["rd" + round + "_win"]/sum
  if (weighted_percentage > random) {
    team1.winsGame();
  } else {
    team2.winsGame();
  }
            
}