# evaluation of a probability

Hy my program i running only for one value but i want to run this for several values By addind result of previous one at a same time.... my program is

SeedRandom[1]
y = RandomInteger[100, {16, 16}]
a = {1}, {3}, {6}, {7}, {1, 3}, {1, 6}, {1, 7}, {3, 6}, {3, 7}, {6, 7}, \
{1, 3, 6}, {1, 3, 7}, {1, 6, 7}, {3, 6, 7}, {1, 3, 6, 7};
x = y[[Join[a, a + 8], Join[a, a + 8]]];
(-2 (1 - v))^1/Sqrt[Det[x + I]]


, I is a identity matrix of corresponding size of x ,This program giving error not picking values of a one by one .. What Should be possible error in my program

• What is a suppose to be? Maybe you mean a = {{1}, {3}, {6}, {7}, {1, 3}, {1, 6}, {1, 7}, {3, 6}, {3, 7}, {6, 7}, {1, 3, 6}, {1, 3, 7}, {1, 6, 7}, {3, 6, 7}, {1, 3, 6, 7}}, but the rest doesn't make sense. Moreover, I is the built-in symbol for the complex unit (sometimes falsely denoted by $\sqrt{-1}$). – Henrik Schumacher Aug 6 '18 at 9:15
• sorry I is identity matrix and a is a list of submatrix that can extracted from a y calculate probability – muhammad asif Aug 6 '18 at 11:39
• Please try this: SeedRandom[1]; y=RandomInteger[100,{16,16}]; a={{1},{3},{6},{7},{1,3}, {1,6},{1,7},{3,6},{3,7},{6,7},{1,3,6},{1,3,7},{1,6,7},{3,6,7},{1,3,6,7}}; Map[(Print["# is ", #]; x=y[[Join[#, #+8],Join[#, #+8]]]; Print["x is ", x]; (-2(1-v))^(1/Sqrt[Det[x+IdentityMatrix[Length[x]]]]))&, a] and see if each step of this is correctly doing what you want. Map uses each entry in a one at a time and names that entry #. If not then please explain how someone who does not understand what you want would be able to do each step of your calculation and give you the correct result. Thanks – Bill Aug 6 '18 at 14:37
• Sir Bill program evaluating the formula but does not adding them – muhammad asif Aug 7 '18 at 9:42
• please bill sir give me any idea to add all results at end – muhammad asif Aug 8 '18 at 8:23