Justification for using the click-through rate in hypothesis testing The click-through rate (CTR) is defined as the total number of clicks divided by the total number of impressions. The diversion unit is usually a cookie, as it is the case in the following course by Google:
https://www.udacity.com/course/ab-testing--ud257
In this setting, the same cookie can generate multiple views and clicks. I am trying to wrap my head around how this is a valid setup given that the data points that go into the calculation of the CTR are not independent. Why is it a valid metric to calculate in the context of hypothesis testing and using, for instance, various classical proportion tests? In addition, how does one go about doing a power analysis in this setting with dependent observations?
Thank you!

You are right that views and clicks from the same user are not independent events, and this violates the assumptions of classical tests like a t-test on proportions. This grouping behavior in the data could be addressed by, for example, using a mixed effects logistic regression with a random intercept for each cookie, or a bootstrap or permutation test stratified by cookie (so that the unit of re-sampling is all of the views and clicks for each cookie).
However, you can keep going in this direction virtually forever. For example, the cookies are also not independent samples -- cookies correspond to real people who know each other and share links, different people who use the same device, cookies from one geographic region may be correlated (perhaps it was rainy so users stayed inside and were more active), etc.. As George E P Box said, "all models are wrong, but some are useful", and so your goal should be to find a model that is useful for understanding the signal in your data.
