Real World Examples

Real World Examples

Here are some examples:

Trading

Imagine you're a trader, and you come across a new trading strategy or indicator. Before investing a lot of money, you want to know if the strategy actually works or if it's just due to chance.

Null Hypothesis (H0)( H_0 ) : The new trading strategy doesn't give any better results than random chance.

Alternative Hypothesis (H1)( H_1 ) : The trading strategy gives better results than random chance.

You would then:

  1. Backtest the strategy over past data.
  2. Calculate a test statistic based on the strategy's performance.
  3. Find the p-value.
  4. If the p-value is small (less than, say, 0.05), you might conclude that the strategy does indeed perform better than random chance.

In the trading world, this is akin to determining if one strategy genuinely outperforms another or if the observed difference is just a result of randomness.

IQ scores Urban vs Rural

Let's set up a hypothesis test to determine if there's a difference in IQ scores between people living in urban and rural areas.

Setting up the Hypotheses:

  1. Null Hypothesis H0H_0: There is no difference in average IQ scores between people living in urban and rural areas. In mathematical terms, this can be represented as: μurban=μrural\mu_{\text{urban}} = \mu_{\text{rural}} where ( \mu ) represents the average IQ score.

  2. Alternative Hypothesis HaH_a or H1H_1: There is a difference in average IQ scores between people living in urban and rural areas. Mathematically, this can be stated as: μurbanμrural\mu_{\text{urban}} \neq \mu_{\text{rural}}

Procedure:

  1. Collect Data: First, you'll need to gather a sample of IQ scores from both urban and rural populations. Ideally, these samples should be random and representative of the populations they come from. Let's say you gather IQ scores from 100 individuals in each group.

  2. Compute Test Statistic: You'll then compute the mean and standard deviation of IQ scores for each group. Based on these, you can compute a test statistic (like a t-statistic) that will tell you how different the two sample means are relative to the variability within the samples.

  3. Determine P-value: The P-value will tell you how likely you'd observe the computed test statistic (or something more extreme) if the null hypothesis is true. A small p-value (typically less than 0.05) suggests the data provides strong evidence against the null hypothesis.

  4. Make a Decision:

    • If the p-value is less than a predetermined significance level (e.g., 0.05), you reject the null hypothesis in favor of the alternative. This means there's statistically significant evidence of a difference in IQ scores between the two groups.
    • If the p-value is greater than the significance level, you fail to reject the null hypothesis, suggesting there's not enough statistical evidence to conclude a difference in IQ scores between the two groups.

Interpretation:

It's important to note that rejecting the null hypothesis doesn't necessarily mean there's a huge or practically significant difference between the groups. It just means there's a statistically significant difference. The size or magnitude of the difference (often measured by effect size) will give you an idea of practical significance.

Remember, the goal of hypothesis testing is not just to find differences but to determine if those differences are statistically significant and not just due to random chance.

Pharmaceutical companies use a rigorous statistical framework to determine the efficacy of a new drug. This process involves multiple phases of clinical trials. One of the most crucial aspects of these trials is the use of hypothesis testing, similar to what we discussed earlier.

Clinical Trials

Imagine you have two groups of people: one group gets a candy (placebo) and the other group gets a magical candy (the new drug). After some time, you want to see if the group that ate the magical candy is healthier than the other group. If they are significantly healthier, then maybe the magical candy (drug) works!

Setting up the Hypotheses

  1. **Null Hypothesis (H0)( H_0 ) **: The new drug is no better, or even worse, than the current standard treatment (or placebo).

  2. **Alternative Hypothesis (Ha)( H_a ) or (H1)( H_1 ) **: The new drug is better than the current standard treatment (or placebo).

Procedure

  1. Randomized Controlled Trials (RCTs): Participants are randomly assigned to either the treatment group (receives the drug) or the control group (receives a placebo or standard treatment). Randomization ensures that any differences in outcomes can be attributed to the drug and not other factors.

  2. Blinding: Often, neither the participant nor the researcher knows who is receiving the drug or placebo (double-blind trial). This ensures that expectations and biases don't affect the results.

  3. Compute Test Statistic: After the trial, researchers calculate a test statistic based on the difference in outcomes between the two groups. This could be the difference in recovery rates, symptom scores, or any other relevant metric.

  4. Determine P-value: The P-value helps researchers determine the likelihood of observing the results if the null hypothesis were true. A small p-value (usually less than 0.05) suggests that the drug had a significant effect.

  5. Make a Decision: Based on the p-value and other factors, researchers decide whether the drug's effect is statistically significant.

  6. Multiple Phases: Drugs go through multiple phases of clinical trials:

    • Phase I: Safety and dosage.
    • Phase II: Efficacy and side effects.
    • Phase III: Confirmation of effectiveness and monitoring of adverse reactions in larger groups.
    • Phase IV: Post-marketing surveillance to monitor long-term effects.

Interpretation

Even if a drug passes the statistical tests, it also needs to be clinically significant. For instance, if a new painkiller reduces pain by just a tiny fraction more than a placebo, it might be statistically significant but not clinically relevant.

Relation to Trading

Just like in trading, where you wouldn't adopt a new strategy based on a few days of good results, pharmaceutical companies don't approve drugs based on initial positive findings alone. The drug needs to consistently prove its efficacy and safety across various trials and scenarios.

This suggests that the new drug may be more effective than the placebo in aiding recovery. However, to claim this with confidence, a rigorous statistical test (like a t-test) would need to be conducted to determine if this difference in recovery rates is statistically significant and not just due to random chance.

In the world of pharmaceuticals, this step is crucial. Even if initial results are promising, the drug must undergo further trials and tests to ensure its safety and efficacy before it can be approved for public use.

In the context of trading, just as one wouldn't rush to adopt a strategy based on a few days of positive results, pharmaceutical companies employ a methodical approach to validate the efficacy of a drug. The drug has to prove its worth across multiple scenarios before it can be considered effective and safe.