Skip to main content
14 events
when toggle format what by license comment
Dec 30, 2022 at 18:37 comment added Iosif Pinelis @BillBradley : Such things have happened to me quite a few times. I am glad this answer was of help.
Dec 30, 2022 at 16:12 vote accept Bill Bradley
Dec 30, 2022 at 16:06 comment added Bill Bradley Guessing what //N meant in Mathematica was not obvious :). I've found the discrepancy; in my original code, I confused the probability of violating the bound with the probability of satisfying the bound (i.e., $\epsilon$ vs $1-\epsilon$). Thank you for your help with my idiotic error; I've been staring at it for days.
Dec 30, 2022 at 14:59 comment added Bill Bradley Thank you so much for this thoughtful answer. In case it wasn't clear from my question, obviously I assume that the DKW inequality is correct and something about my own approach was in error. I will now try to deduce enough Mathematica to read your code, compare it with my own, and look for discrepancies.
Dec 30, 2022 at 14:48 comment added Iosif Pinelis @MattF. : I have used these commands, maybe a couple times each (except for Map, which I have used quite a few times). Yet, I keep forgetting how to use those commands or even their names.
Dec 30, 2022 at 14:36 comment added user44143 I have seen you get plenty of good results quickly with Mathematica! For me, the key to using it well is knowing that you can write most loops more elegantly with built-in functions. Here Range is helpful, but I also frequently find second-order functions like Fold/FoldList, Nest/NestList, Map/MapAt, Outer, Thread to be useful, even if figuring out which one I need requires a pause to review some examples first.
Dec 30, 2022 at 13:04 history edited Iosif Pinelis CC BY-SA 4.0
added 359 characters in body
Dec 30, 2022 at 4:48 comment added Iosif Pinelis @MattF. : Thank you for your comment. I have used Mathematica for many years, but have never become good at using it.
Dec 30, 2022 at 4:46 history edited Iosif Pinelis CC BY-SA 4.0
added 2572 characters in body
Dec 30, 2022 at 2:25 comment added user44143 You could also write the function as (RandomReal[{0,1},n] // Sort - Range[n] / n) // Abs // Max
Dec 29, 2022 at 22:30 history edited Iosif Pinelis CC BY-SA 4.0
deleted 287 characters in body
Dec 29, 2022 at 22:01 history edited Iosif Pinelis CC BY-SA 4.0
added 178 characters in body
Dec 29, 2022 at 21:50 history edited Iosif Pinelis CC BY-SA 4.0
added 58 characters in body
Dec 29, 2022 at 21:22 history answered Iosif Pinelis CC BY-SA 4.0