I have started learning bioinformatics. There are some matter of finding expected value. But I think I am very weak in calculating such types of things.
As expected value is related to statistics, its explanation is skipped in bioinformatics. So, I am posting it here.
Suppose, I have 500 strings, each having length 1000.
Now, I have to calculate the expected number of occurrences of a sub-string having length exactly 9.
Notice that, the string contains only four letters A, T, G, C with same probability (each 0.25).
Another thing to be noted: Overlapping strings should be counted.
The probability of existing a 9-length sub-string among all 9-length sub-strings = $ (0.25)^9 $
The number of occurrences of a 9-length sub-string in a string having length 1000 = $ (1000-9+1) * (0.25)^9 $
If the number of such string becomes 500, then the number of occurrences would be = $ 500 * (1000-9+1) * (0.25)^9 $
But I did wrong somewhere, may be in assumption or in calculation.
Could you please guide me to get the actual solution?
This problem is a part of Bioinformatics course track in Coursera.
Allowable error = 0.0001