Permutations

CODAP Forums CODAP Help Forum Permutations

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #6995 Score: 0
    Hugo Hernández
    Participant

    Hello:

    I´m trying to simulate a Poisson distribution, but I´m facing the problem of not having the factorial function. I’m running out of ideas. Is there a way in which I can calculate n! or at least the (n, r) permutaion?

    #6996
    Dan Damelin
    Keymaster

    Well, this is not ideal, but if your range for n is limited enough, you could create one table that calculates the various values for n, and then use that table as a lookup for your own n! function. (The lookup table could be closed, so it would not be visible.)

    See example here:

    https://codap.concord.org/releases/latest/static/dg/en/cert/index.html#shared=https%3A%2F%2Fcfm-shared.concord.org%2FeBUpBKFKJzDmxewhRN3O%2Ffile.json 

    #6997
    Hugo Hernández
    Participant

    Thank you so very much! This has been very usefull. I had to shorten my x’s values, but that doesn´t make any difference to what I´m aiming

    #6998
    Bill Finzer
    Keymaster

    Hi Hugo,

    This doesn’t help in the short term, but I’ve added a request for a C(n,r) function.

    Bill

    #6999
    Hugo Hernández
    Participant

    Hi, Bill:

    I´m glad to hear about you! Thanks so very much; I guess that will be usefull. In the mean time, Dan Damelin above just gave me a very good solution for the work in progress.

    I hope to see you in Rosario on September. Take care.

    #7000
    Bill Finzer
    Keymaster

    I dug around a bit and found that CODAP already has a combinations(n,k) function. But you asked for permutations, so perhaps that is no help.

    #7001
    Hugo Hernández
    Participant

    I thought you meant Permutations on the last message, since CODAP has combinations already. But happily there’s a way to do the simulation.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘CODAP Help Forum’ is closed to new topics and replies.