The Naked Scientists
  • Login
  • Register
  • Podcasts
      • The Naked Scientists
      • eLife
      • Naked Genetics
      • Naked Astronomy
      • In short
      • Naked Neuroscience
      • Ask! The Naked Scientists
      • Question of the Week
      • Archive
      • Video
      • SUBSCRIBE to our Podcasts
  • Articles
      • Science News
      • Features
      • Interviews
      • Answers to Science Questions
  • Get Naked
      • Donate
      • Do an Experiment
      • Science Forum
      • Ask a Question
  • About
      • Meet the team
      • Our Sponsors
      • Site Map
      • Contact us

User menu

  • Login
  • Register
  • Home
  • Help
  • Search
  • Tags
  • Recent Topics
  • Login
  • Register
  1. Naked Science Forum
  2. General Discussion & Feedback
  3. Just Chat!
  4. What do you mean by "random"?
« previous next »
  • Print
Pages: 1 [2]   Go Down

What do you mean by "random"?

  • 27 Replies
  • 5492 Views
  • 0 Tags

0 Members and 1 Guest are viewing this topic.

Offline Eternal Student

  • Naked Science Forum King!
  • ******
  • 1832
  • Activity:
    7.5%
  • Thanked: 470 times
Re: What do you mean by "random"?
« Reply #20 on: 23/07/2021 22:58:39 »
Hi @alancalverd

I thought several ideas had already been presented.   Are you looking for some improvement, refinement or continued discussion?
Logged
 



Marked as best answer by on 10/08/2025 15:51:29

Offline Bored chemist

  • Naked Science Forum GOD!
  • *******
  • 31102
  • Activity:
    11%
  • Thanked: 1291 times
  • Undo Best Answer
  • Re: What do you mean by "random"?
    « Reply #21 on: 24/07/2021 00:58:49 »
    Quote from: evan_au on 22/07/2021 11:08:57
    A few weeks ago I was doing a Monte-Carlo simulation (yes, that is a thing!), and needed to generate a lot of random sequences; I was using EXCEL to generate them.
    See: https://en.wikipedia.org/wiki/Monte_Carlo_method

    There were a number of methods on the web that would generate random numbers "with replacement", but I wanted to do it "without replacement".
    - If you are running a clinical trial, you can't give two different patients the same bottle of medicine
    - And you don't want any bottles left over at the end
    - And you don't want to allocate more people to one arm of the trial than the other
    - What you want is a random permutation:
           - Randomly assign 100 people to 100 bottles of medicine; once you have assigned a bottle to a person, that bottle is removed from consideration.
           - It also works in the opposite direction: once you have assigned a person to a bottle, that person is removed from consideration.

    I found a method on the web that is pretty much what bored chemist suggested, generating a random permutation:
    - Generate a row of random numbers (however many you need): EXCEL has a RND() function.
    - Lookup the list of random numbers and pick the nth largest, using the "LARGE()" function
    - Find the index of that entry using the "MATCH()" function
    - It seems rather roundabout, but it works well.
    - I wanted to generate a hundred random permutations: Just copy the equations 100 times
    - I wanted to run the simulation many times with different inputs: Every time you click "Calculate", it generates a new simulation and graphs the results...
    This is the method I used: https://superuser.com/questions/972507/can-i-produce-a-row-in-excel-which-is-random-permutation-of-another-row

    But I think Alan only wanted to generate 1 random permutation.

    Apparently, EXCEL in Microsoft365 has a new RANDARRAY function that can be used to randomly permute a list by coupling it with the SORTBY function:
    https://www.ablebits.com/office-addins-blog/2020/07/15/excel-randarray-function-generate-random-numbers/

    Am I missing something?
    Number the bottle 1 to 100 in any way you see fit. If it helps, include the "placebos"
    Put the patients in a list- for example, by DoB- it won't matter
    Put a random number next to each patient (that's why it doesn't matter)

    Sort the patients by the random number.
    That puts the patients into a random order.
    Give bottle1 to the fist patient, bottle 2 to the second and so on.

    You will give exactly 100 patients exactly 100 bottles in a way where each patient gets one bottle

    Logged
    Please disregard all previous signatures.
     

    Offline Bored chemist

    • Naked Science Forum GOD!
    • *******
    • 31102
    • Activity:
      11%
    • Thanked: 1291 times
    Re: What do you mean by "random"?
    « Reply #22 on: 24/07/2021 01:00:36 »
    Quote from: Eternal Student on 23/07/2021 22:58:39
    I thought several ideas had already been presented.   Are you looking for some improvement, refinement or continued discussion?
    I'm looking for a refinement that doesn't include trollish conspiracy theorists.
    Logged
    Please disregard all previous signatures.
     

    Offline hamdani yusuf

    • Naked Science Forum GOD!
    • *******
    • 11803
    • Activity:
      71%
    • Thanked: 285 times
    Re: What do you mean by "random"?
    « Reply #23 on: 24/07/2021 07:30:23 »
    The purpose of randomization is to remove bias other than the difference of treatment, which can be caused by some correlation between how the patients are treated and other parameters that actually affect the results, such as age, gender, habits, genetics, and other preexisting medical conditions. So, in most cases, procedure proposed by BC should be enough.
    Logged
    Unexpected results come from false assumptions.
     

    Offline alancalverd

    • Global Moderator
    • Naked Science Forum GOD!
    • ********
    • 21162
    • Activity:
      63.5%
    • Thanked: 60 times
    • Life is too short for instant coffee
    Re: What do you mean by "random"?
    « Reply #24 on: 24/07/2021 10:27:33 »
    As usual, the discussion has moved way off the original point, which was to note that there are different interpretations of "random" within a closed set, some of which may permit (or even guarantee) duplicates.

    Suddenly, DNA does not seem all that improbable!
    Logged
    Helping stem the tide of ignorance
     



    Offline Bored chemist

    • Naked Science Forum GOD!
    • *******
    • 31102
    • Activity:
      11%
    • Thanked: 1291 times
    Re: What do you mean by "random"?
    « Reply #25 on: 24/07/2021 11:24:37 »
    Quote from: alancalverd on 24/07/2021 10:27:33
    which was to note that there are different interpretations of "random" within a closed set, some of which may permit (or even guarantee) duplicates.
    Noted.
    (But a bit dull)
    Logged
    Please disregard all previous signatures.
     

    Offline Eternal Student

    • Naked Science Forum King!
    • ******
    • 1832
    • Activity:
      7.5%
    • Thanked: 470 times
    Re: What do you mean by "random"?
    « Reply #26 on: 24/07/2021 14:06:45 »
    Hi.
    Quote from: alancalverd on 24/07/2021 10:27:33
    As usual, the discussion has moved way off the original point, which was to note that there are different interpretations of "random" within a closed set, some of which may permit (or even guarantee) duplicates.
        OK.  Well then let's briefly discuss the notion of "random" again.

    Quote
    A random variable X is a measurable function X : Ω → E from a set of possible outcomes Ω to a measurable space E. The technical axiomatic definition requires Ω to be a sample space of a probability triple ( Ω , F , P ).

    The probability that X takes on a value in a measurable set S ⊆ E is written as

        P ⁡ ( X ∈ S ) = P ⁡ ( { ω ∈ Ω ∣ X ( ω ) ∈ S } )
    [Based on Wikipedia entry for "Random variable"

        So "random" really doesn't mean "equally likely" or imply that there is no bias, or that there would be no pattern discernible in the outcomes. 
        You are very fortunate in that all of your sets are finite, so there won't be any probelms constructing the measure spaces we need.  You could choose to assign every patient to the placebo group.  That is "random" just with an unusual probability distribution.
        Scientists tend to use the term "random" in a slightly different way but that's not their fault.  They don't have a lot of time to study probability or measure theory.
         Until recently I would have been quite certain that probability is not something that exists in Nature but instead it is only an abstract mathematical object.  It's just that we don't have sufficient information and therefore some things appear to be random. 
         Quantum Mechanics may change some of this.  It seems that for some systems we cannot have all the information:  It's not that we haven't tried hard enough to gather the information but just that some quantities (like position and momentum) cannot be known simultaneously no matter how hard you try.

    Best wishes to everyone.
    Logged
     

    Offline alancalverd

    • Global Moderator
    • Naked Science Forum GOD!
    • ********
    • 21162
    • Activity:
      63.5%
    • Thanked: 60 times
    • Life is too short for instant coffee
    Re: What do you mean by "random"?
    « Reply #27 on: 24/07/2021 14:45:42 »
    Quantum mechanics is actually a bit "harder" than not knowing. I think there has been a longstanding mistranslation of Heisenberg's Indeterminacy Principle as "uncertainty", and it would help if mathematicians could tell the public that there is a difference! I am quite certain that the ratio 0/0 is correct, but it is certainly indeterminate. Likewise the position of an electron in a hydrogen atom is indeterminate: it could be anywhere, but we can be quite certain about the probability of it being in certain places. 
    Logged
    Helping stem the tide of ignorance
     



    • Print
    Pages: 1 [2]   Go Up
    « previous next »
    Tags:
     
    There was an error while thanking
    Thanking...
    • SMF 2.0.15 | SMF © 2017, Simple Machines
      Privacy Policy
      SMFAds for Free Forums
    • Naked Science Forum ©

    Page created in 0.391 seconds with 42 queries.

    • Podcasts
    • Articles
    • Get Naked
    • About
    • Contact us
    • Advertise
    • Privacy Policy
    • Subscribe to newsletter
    • We love feedback

    Follow us

    cambridge_logo_footer.png

    ©The Naked Scientists® 2000–2017 | The Naked Scientists® and Naked Science® are registered trademarks created by Dr Chris Smith. Information presented on this website is the opinion of the individual contributors and does not reflect the general views of the administrators, editors, moderators, sponsors, Cambridge University or the public at large.