## How to set evidence to a binomial equation node by external counters of successes

The front end.
PCherubini
Posts: 5
Joined: Thu Mar 24, 2022 9:00 am

### How to set evidence to a binomial equation node by external counters of successes

Hi,
See the attached GeNIe network. In example A, you see a uniform pdf node representing probabilities of a hit, feeding a binomial node mapping hits out of 7 attempts (f.y.i., this is part of an attempt to model with bayesian networks Asch's classic psychological experiments on conformism). It works: if you set evidence to "0" hits in the binomial node, the uniform node peaks on very low probabilities of hit; if you set 7 hits, the p of hits peak on high probabilities, etc.
In example B, I NEED to have the output/evidence of the binomial node set by external nodes. I performed different attempts, all of them failed. In the attempt in the file, I use seven chance "observer nodes", set them to evidence (either "hit"or "miss" for each one of them), sum their overall results in an equation node that is also the output of the binomial node... It doesn't work. I can set all the observers to miss or all of them to hit, and the "counter node" correctly equals 0 or 7, but the binomial node does not "take in" the fact that there are 0 or 7 observed hits: it remains uniform, and therefore the probability distribution of "p of hit" in the uniform node is not revised.
Is there a way to feed evidence to a binomial equation node by means of one or several external nodes, so that the binomial node takes those external nodes as its "evidence"? Thank you
binomial5.xdsl
(9.48 KiB) Downloaded 19 times
marek [BayesFusion]
Site Admin
Posts: 392
Joined: Tue Dec 11, 2007 4:24 pm

### Re: How to set evidence to a binomial equation node by external counters of successes

HI Paolo,

I'm not 100% sure if I understand your question completely but I have modified your model (added a third set of variables) and created an additional node through which you can enter evidence. I'm attaching this model. Does this do what you wanted? If not, which I suspect is the case, what would you like to model in that additional node through which you enter evidence?
Cheers,

Marek
Attachments
binomial5.xdsl
(11.4 KiB) Downloaded 17 times
PCherubini
Posts: 5
Joined: Thu Mar 24, 2022 9:00 am

### Re: How to set evidence to a binomial equation node by external counters of successes

Dear Marek,
thank you for the attempt. I think that it is best to describe the problem with your (and mine) solution at a theoretical level. Imagine that there are seven independent "archers". You do not know a priori how hard it is for them to hit a target, and assume a uniform p distribution (represented by function node "p of hit" in our attempts). They start shooting at the target, one by one. If seven out of seven of them hit (i.e., set to state seven your observation node), you are willing to infer that hitting the target is quite easy: the binomial node "observed hits" draft the binomial distribution of these successes, and the "p of hit" node updates to point to more probable high probability of hitting. Similarly, if 0 out of seven of them hits, by the same process the "p of hit" updates to indicate probable low accuracies (it's really hard that all seven missed, if it is quite easy to hit the target). So far, so good both with my first attempt on the left, and with your attempt. BUT: I need to update "p of hit" by steps: first the first archer hits (or misses), and p of hit updates recording one hit out of seven, but NOT KNOWING how many hits or misses there will be in the following six shots. Then the second archer hits, and the p of hits updates upwards... but still not knowing whether or not the following archers will hit. An so on, up to the seventh archer (when information is complete). In our attempts, the network updates the p of hit knowing for certain ALL the outcomes of the seven trials: 0 means no one hits; 1 means 1 hit AND six misses; 2 means 2 hits AND 5 misses, and so on. Instead I need a smooth update, where the network counts "hits up to now", and accordingly provisionally updates the accuracies (p of hit), but witout knowing what the following archer will do (if not as a prediction based on the updated p of hit). I do not know If I managed to explain the problem.
marek [BayesFusion]
Site Admin
Posts: 392
Joined: Tue Dec 11, 2007 4:24 pm

### Re: How to set evidence to a binomial equation node by external counters of successes

Please excuse me for a delay in answering -- I was traveling and had a lot to catch up after the travel.

Thank you for the clear explanation of the problem. Now I see what you are after. I think the attached model will do the trick. You will need to enter evidence for the nodes Observation? (either 0 or 1). It would be more elegant to make all these nodes discrete but that would force you to use discrete values for p and you may want to avoid a-priori commitment to any discretization. In any case, I think the model does what you want.
Cheers,

Marek
Attachments
Binomial Marek.xdsl
(6.84 KiB) Downloaded 16 times
PCherubini
Posts: 5
Joined: Thu Mar 24, 2022 9:00 am

### Re: How to set evidence to a binomial equation node by external counters of successes

Thanks a lot, it does! Very brilliant! thank you for your help and patience
Cheers
p