randIntNoRep?

499 views
Skip to first unread message

Mike Bevelacqua

unread,
Nov 16, 2011, 5:13:50 PM11/16/11
to tinspire
The new 84OS has a randIntNoRep ( function...Is randSamp( the Nspire
"version" of this function? If so, how does this work?

Thanks,
Mike

Marc Garneau

unread,
Nov 16, 2011, 5:54:27 PM11/16/11
to tins...@googlegroups.com
Randsamp has a parameter to make the selection with replacement or without. Randsamp also requires a list to sample from, so to do a random sample of integers, you'd need to create the list of integers first, or embed it within the randsamp command.

For example, to simulate a lotto 6-49 draw:
randSamp(seq(x,x,1,49),6,1)

The 1 at the end means without replacement. If you want replacement, change the 1 to 0.

Marc Garneau

> --
> To post to this group, send email to tins...@googlegroups.com
> To unsubscribe send email to tinspire+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> The tns documents shared by group members are archived at
> https://sites.google.com/site/tinspiregroup/classroom-news/welcome-abouttime

Mike Bevelacqua

unread,
Nov 16, 2011, 9:15:47 PM11/16/11
to tinspire
Thanks Marc...this is exactly what I needed.

On Nov 16, 4:54 pm, Marc Garneau <pi...@telus.net> wrote:
> Randsamp has a parameter to make the selection with replacement or without.  Randsamp also requires a list to sample from, so to do a random sample of integers, you'd need to create the list of integers first, or embed it within the randsamp command.
>
> For example, to simulate a lotto 6-49 draw:
> randSamp(seq(x,x,1,49),6,1)
>
> The 1 at the end means without replacement. If you want replacement, change the 1 to 0.
>
> Marc Garneau
>
> On 2011-11-16, at 2:13 PM, Mike Bevelacqua <mbevelac...@aea10.k12.ia.us> wrote:
>
>
>
>
>
>
>
> > The new 84OS has a randIntNoRep ( function...Is randSamp( the Nspire
> > "version" of this function?  If so, how does this work?
>
> > Thanks,
> > Mike
>
> > --
> > To post to this group, send email to tins...@googlegroups.com
> > To unsubscribe send email to tinspire+u...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com.au/group/tinspire?hl=en-GB?hl=en-GB
> > The tns documents shared by group members are archived at
> >https://sites.google.com/site/tinspiregroup/classroom-news/welcome-ab...

alcoonslists

unread,
Nov 17, 2011, 9:54:17 AM11/17/11
to tins...@googlegroups.com
I only see TI 84 2.55MP online. Where do we find the new 84 OS?

Thanks,

Al

> https://sites.google.com/site/tinspiregroup/classroom-news/welcome-abouttime

Don

unread,
Nov 17, 2011, 3:09:07 PM11/17/11
to tinspire
It comes with the latest TI-NSpire update. Load it on to your
calculator and then change the keyboard to the TI-84 keypad.

Don
> >https://sites.google.com/site/tinspiregroup/classroom-news/welcome-ab...

alcoonslists

unread,
Nov 17, 2011, 4:22:31 PM11/17/11
to tins...@googlegroups.com
Don,

That only works if you are not using CX's or touchpad CAS HH.

randIntNoRep is part of 2.55MP.

Is there a newer OS than 2.55MP? I cannot find any reference to it online? What is its version number.

Thanks,

Al

> https://sites.google.com/site/tinspiregroup/classroom-news/welcome-abouttime

Al
-------------------------
Albert Coons
al_c...@bbns.org
Buckingham Browne & Nichols School
Gerry's Landing Road
Cambridge, MA 02138
(617) 800-2264

AP Statistics Web Site: www.bbn-school.org/us/math/ap_stats

Sean Bird

unread,
Nov 17, 2011, 4:35:02 PM11/17/11
to tins...@googlegroups.com
The 2.55MP is the 'new' OS that is being discussed that has randintNoRep. It has been around for a good while now.

The attached image shows how a randintnorep can be defined on the Nspire. This could be put in a library and used in any document or Scratchpad.

- Sean Bird
randintnorep.png

alcoonslists

unread,
Nov 17, 2011, 4:36:53 PM11/17/11
to tins...@googlegroups.com
As best as I can tell theTI 84 randintnorep does not sample from a list, but rather only from a sequence of integers.

randintnorep(lowerbound, upperbound)

for example:

randintnorep(6,8)
enter
{6,8,7}
enter
{8,6,7}
etc.

On the other hand, the Nspire randSampl(list,#trials,0) lets you sample without replacement from any data list:

For example:

randSamp({11,22,369},3,1)
{22,11,369}

or

randSamp({"Tom","Bill","Judy"},3,1)
{Judy, Tom, Bill}

Since we often sample data other than sequences of integers in stats, I like the Nspire implementation a lot more.

Al

PS. We do have a slick way to sample without replacement from any list in the TI-84. A Kludge but elegant. Can supply the algorithm if anyone cares.

Al


Reply all
Reply to author
Forward
0 new messages