• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Any maths / statistics whizzes here?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Originally posted by scooterscot
    wasn't me chief - used r for donkeys, since uni days, along with SPSS and sometimes matlab

    I'm not a risk analyst, I'm an engineer.
    Were you at uni in 2014?



    https://www.contractoruk.com/forums/...ml#post2002494

    Comment


      #32
      Originally posted by scooterscot
      And? Never googled it before, so what?
      Keep digging, scootie.

      https://www.contractoruk.com/forums/...ml#post2002528

      Your cretinism is about to break the internet.

      Comment


        #33
        Originally posted by scooterscot
        You know full well r is just an extension of s, which is what we used back then - gwd

        Comment


          #34
          Originally posted by scooterscot
          R I use for simulations - you use what you know.
          Show us the code, or it didn't happen.
          Down with racism. Long live miscegenation!

          Comment


            #35
            Dunno if I understood the prob but here's some R code which gives the average weeks in the order of 1850-ish.

            Code:
            nums <- c(rep(0, 1000))
            
            for (j in 1:1000){
              
              count <- 0
              people <- c(rep(FALSE, 1000))
              while (TRUE) {
                
                count <- count + 1
                
                k <-  sample(1:1000,4,replace=F)
                for (i in 1:4){
                  people[k[i]] <- TRUE
                }
                
                if (all(people)) {break}
              }
                nums[j] <- count
              
            }
            
            print(mean(nums))
            Edit: Actually more like 1860-ish which kind of matches NAT.
            Edit2: Assumes sampling with replacement
            NATEdit3: Add code tags around it to make it a bit more readable.
            Last edited by sasguru; 19 April 2020, 11:20.
            Hard Brexit now!
            #prayfornodeal

            Comment


              #36
              Originally posted by DealorNoDeal View Post
              I tweaked a program I'm working on, for random walks in asset prices, to test this out.

              1000 people
              Each week 0.4% (4 people), selected at random, do the thing.

              Running 1000 trials...

              After 250 weeks, 633 people have done the thing at least once
              After 500 weeks, 865 people
              After 1000 weeks, 982 people

              To reach 1000 people, with a reasonable confidence level, I had to extend the number of weeks to 4000.
              I think jamesbrown had the soundest algebraic approach.

              The probability, P, of any given person not doing the "thing" after n weeks is given by P = (1 - 1/250)^n

              Equating that to, say, 1/250 and taking logs gives n = 1377 (to the nearest integer). But you could choose any (small) value to represent the near certainty of any given person doing "it", and the values of n increase rapidly as P tends to zero.
              Last edited by OwlHoot; 19 April 2020, 14:02.
              Work in the public sector? Read the IR35 FAQ here

              Comment


                #37
                Originally posted by scooterscot

                The solution may be solved using a deterministic approach, you've got everything you need. No need for a probabilistic approach, assuming inputs are not changing with each new week.
                Well the OP didn't mention probability, true, but that was inferred as he mentioned thinking "It isn't as simple as 1000 / 0.04".

                Also, no mention was made of whether or not this "thing" can be done more than once. So we don't necessarily have all we need.

                But, say there were N people in a prison and the "thing" was getting shot by a sadistic guard who chose 0.04 of the inmates at random to shoot each day. Even then there is some ambiguity, because as ladymuck pointed out in so many words (I think? ) we aren't told whether the number shot is 0.04 * N each day or 0.04 of the surviving prison population, which is decreasing daily.
                Last edited by OwlHoot; 19 April 2020, 18:04.
                Work in the public sector? Read the IR35 FAQ here

                Comment


                  #38
                  Originally posted by scooterscot
                  The solution may be solved using a deterministic approach, you've got everything you need. No need for a probabilistic approach, assuming inputs are not changing with each new week.
                  Feck off, you fraud.
                  Hard Brexit now!
                  #prayfornodeal

                  Comment


                    #39
                    There's Lies.

                    There's damned Lies.

                    Then there's Statistics.

                    Comment


                      #40
                      Originally posted by Lost It View Post
                      There's Lies.

                      There's damned Lies.

                      Then there's Statistics.
                      Then there's Pooperscooper.

                      Comment

                      Working...
                      X