I am reading up an article and came across sampling scenario, but I am not able to come up with intuition behind the numbers presented.
Scenario: User issuing search queries to a search engine.
"Suppose a user has issued s search queries one time in the past month, d search queries twice, and no search queries more than twice. If we have a 1/10th sample, of queries, we shall see in the sample for that user an expected s/10 of the search queries issued once. Of the d search queries issued twice, only d/100 will appear twice in the sample; that fraction is d times the probability that both occurrences of the query will be in the 1/10th sample. Of the queries that appear twice in the full stream, 18d/100 will appear exactly once."
So here is how I interpreted the above scenario s queries are sampled at 1/10 rate.
Therefore probability of retaining an element from s elements = 1/10
Probability that a query issued twice is retained = 1/10 * 1/10
But this where I deviate, probability of retaining d such queries issued twice must be = (1/10)^d right?
The probability of a query appearing once in a sample but issued twice = 1/10*(1-1/10) = 9/100 right?
Where am I going wrong?