If I randomly generate a substring (example "ATGCAGC") with equal probability (1/X where X=4) for each digit with length (L) digits: What is the formula for finding the probability (P) of randomly generating that sequence (T) times, given a total string length (N)?
Example: Given "ATGCAGC" string length L=7, number of possible characters X=4 with equal probability of being randomly generated 1/X.
In a case where N characters are generated, what is the probability that an exact substring with length L will occur T times?
If I have randomly, sequentially generated N=7000 characters, what is the probability that any exact substring length L=7 "ATGCAGC" will occur T=2,3,4... times?
P is my dependent variable. L, T, N, X are independent.
In terms of dice:
Example: If I sequentially roll a X=6 sided die N=7000 times: What is the P=probability I will roll the die sequentially the same (1,4,6,5,3,2,3) with sequence length L=7 for T=2 sequentially identical occurrences in the N=7000 sequential rolls of a single die?
What is the probability in 7000 rolls I will have any 2 runs of 7 throws that have an exact sequential match? Example: (1,4,6,5,3,2,3 on rolls 201-207) and (1,4,6,5,3,2,3) on rolls 5001-5007. It could be any number of (T) occurrences, on any roll numbers in (N) total die rolls.
I am specifically solving for the probability, given any values for the independent variables. Overlapping or non-overlapping substrings or both are great.
My question is related to (How many times will a consecutive sequence of throws randomly appear if I throw a four-sided die N times?)