# Hypothesis Testing

Hypothesis testing can help you determine if your model is actually consistent with the real-world data. It is important to use proper hypothesis testing to avoid issues like overfitting (e.g., using too many parameters so that your model only works well on your historical data).

# Hypothesis Testing

You’re considering a tech investment, and are deciding between investing in Apple (AAPL) and Microsoft (MSFT). If their performance is the same, then you are indifferent about which investment to make.

However, you believe that AAPL stock might outperform MSFT stock. To test this, you have the null hypothesis AAPL $$\_\_\_$$ MSFT and the alternative hypothesis AAPL $$\_\_\_$$ MSFT. What should go in the two blanks, respectively?

# Hypothesis Testing

You have a coin that you think might be weighted, so you flip it 1000 times and see how many times it comes up heads. What distribution could you use to model the null hypothesis of a fair coin?

# Hypothesis Testing

Your friend believes that stock prices are normally distributed. He says that the price of Stock A at the end of the year is approximately normally distributed with mean 200 and standard deviation 30, and the price of Stock B at the end of the year is approximately normally distributed with mean 180 and standard deviation 40.

According to his hypothesis, what is the approximate probability that stock B finishes the year with a higher price than stock A?

# Hypothesis Testing

An important counterpart to hypothesis testing is the confidence interval. When estimating some population parameter via sampling, a confidence interval is an interval that should contain the true parameter some percentage of the time. For example, a 90% confidence interval should contain the true parameter 90% of the time.

# Hypothesis Testing

Suppose you are asked to make a 90% confidence interval on the population of a far-away country. Then, you are offered an $$X:1$$ bet against your interval by someone who you believe to be equally uninformed. What is the smallest $$X$$ where you would be willing to take this bet, assuming that you will take any bet with non-negative expected profit?

(Note: a $$X:1$$ bet would mean you receive the money from a person if they lose, but they get their bet times $$X$$ back if they win.)

# Hypothesis Testing

A stock’s (daily) log-returns are normally distributed, and a quantitative analyst finds that the 95% confidence interval for the sum of the log-returns over a 10 day period is $$[-1,1].$$

If the stock is currently \$100, then the 95% confidence interval for where it will be after these 10 trading days is $$[a,b].$$ What is $$a+b?$$

Note that the log-return between day $$i$$ with price $$S_i$$ and day $$j$$ with price $$S_j$$ is $$\log_e\left(\frac{S_j}{S_i}\right).$$

×