From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to present each case in a case structure a certain percentage of the iterations

Solved!
Go to solution

@jcarmody wrote:

Maybe the probability of a "1" is valid for each element, but I don't think this is what the OP wanted.  This example should have five Trues, no?  I couldn't get it to fill it with 15 Trues, but 14 happened pretty quickly.


What point are you trying to make? If you have a 0.25 probability for each element, a sum above 14 is very unlikely (but with a probability that can be calculated exactly).

 

It really depends what the OP wanted. If you know that there are exactly 5 trues every time, you can often predict the outcome early. For example if the first 15 elements are false, you can predict the outcome of the next five with 100% certainty. Same if all five TRUEs show up early. Only the Bernoulli solution gives you unpredictability up to the last pick.

0 Kudos
Message 11 of 14
(641 Views)

@altenbach wrote:

 

What point are you trying to make?


My point was that Bernoulli Noise.vi doesn't do what was asked.  If I change my "ones probability" constant to 0.1, I get three Trues more often than I get two.  The OP wrote "I want to present the test stimulus on 90% of the trials and the catch stimulus on 10%".  OP didn't say that he wanted a 90% probability of a test stimulus being presented at each trial.

 

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 12 of 14
(632 Views)
As I said, this makes the test flawed if the subject is good at "card counting". Just trying to help. 🙂
Message 13 of 14
(625 Views)

@altenbach wrote:
[...] Just trying to help. 🙂

You did, thank you, but I missed your point the first time.  I understand now...

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 14 of 14
(607 Views)