Question

In: Advanced Math

Q1. Define/outline the following: a. the difference between a ‘one-tailed test’ and a ‘two-tailed test’. b....

Q1. Define/outline the following:

a. the difference between a ‘one-tailed test’ and a ‘two-tailed test’.

b. the importance of sample size in the context of OLS regression.

*c. four different types of data structures and discuss their potential usefulness and application in finance.

d. the OLS assumptions

e. Correlation is not causation. Briefly discuss.

(c. is the part I'm confused most about)

Solutions

Expert Solution

(a) Differences Between One-tailed and Two-tailed Test

The fundamental differences between one-tailed and two-tailed test, is explained below in points:

  1. One-tailed test, as the name suggest is the statistical hypothesis test, in which the alternative hypothesis has a single end. On the other hand, two-tailed test implies the hypothesis test; wherein the alternative hypothesis has dual ends.
  2. In the one-tailed test, the alternative hypothesis is represented directionally. Conversely, the two-tailed test is a non-directional hypothesis test.
  3. In a one-tailed test, the region of rejection is either on the left or right of the sampling distribution. On the contrary, the region of rejection is on both the sides of the sampling distribution.
  4. A one-tailed test is used to ascertain if there is any relationship between variables in a single direction, i.e. left or right. As against this, the two-tailed test is used to identify whether or not there is any relationship between variables in either direction.
  5. In a one-tailed test, the test parameter calculated is more or less than the critical value. Unlike, two-tailed test, the result obtained is within or outside critical value.
  6. When an alternative hypothesis has ‘≠’ sign, then a two-tailed test is performed. In contrast, when an alternative hypothesis has ‘> or <‘ sign, then one-tailed test is carried out.

(d) The Seven Classical OLS Assumptions

Assumption 1: The regression model is linear in the coefficients and the error term

This assumption addresses the functional form of the model. In statistics, a regression model is linear when all terms in the model are either the constant or a parameter multiplied by an independent variable. You build the model equation only by adding the terms together. These rules constrain the model to one type:

In the equation, the betas (βs) are the parameters that OLS estimates. Epsilon (ε) is the random error.

Assumption 2: The error term has a population mean of zero

The error term accounts for the variation in the dependent variable that the independent variables do not explain. Random chance should determine the values of the error term. For your model to be unbiased, the average value of the error term must equal zero.

Assumption 3: All independent variables are uncorrelated with the error term

If an independent variable is correlated with the error term, we can use the independent variable to predict the error term, which violates the notion that the error term represents unpredictable random error. We need to find a way to incorporate that information into the regression model itself.

Assumption 4: Observations of the error term are uncorrelated with each other

One observation of the error term should not predict the next observation. For instance, if the error for one observation is positive and that systematically increases the probability that the following error is positive, that is a positive correlation. If the subsequent error is more likely to have the opposite sign, that is a negative correlation. This problem is known both as serial correlation and autocorrelation.

Assumption 5: The error term has a constant variance (no heteroscedasticity)

The variance of the errors should be consistent for all observations. In other words, the variance does not change for each observation or for a range of observations. This preferred condition is known as homoscedasticity (same scatter). If the variance changes, we refer to that as heteroscedasticity (different scatter).

Assumption 6: No independent variable is a perfect linear function of other explanatory variables

Perfect correlation occurs when two variables have a Pearson’s correlation coefficient of +1 or -1. When one of the variables changes, the other variable also changes by a completely fixed proportion. The two variables move in unison.

Perfect correlation suggests that two variables are different forms of the same variable. For example, games won and games lost have a perfect negative correlation (-1). The temperature in Fahrenheit and Celsius have a perfect positive correlation (+1).

Assumption 7: The error term is normally distributed (optional)

OLS does not require that the error term follows a normal distribution to produce unbiased estimates with the minimum variance.

(b) Sample size as optimisation problem

  • Bigger samples are better.
  • Sample size is often determined by pragmatic considerations.
  • Sample size should be seen as one consideration in an optimisation problem where the cost in time, money, effort, and so on of obtaining additional participants is weighed against the benefits of having additional participants.
  • For multiple regression, you have some theory to suggest a minimum sample size. If you are going to be using ordinary least squares, then one of the assumptions you require is that the "true residuals" be independent.

  • Many of the sample size/precision/power issues for multiple linear regression are best understood by first considering the simple linear regression context. Thus, I will begin with the linear regression of Y on a single X and limit attention to situations where functions of this X, or other X’s, are not necessary. As an illustration, I will use a genuine ‘‘prediction’’ problem. (Some clinical ‘‘pre’’- diction problems, including diagnostic ones, and the quantitative examples I cite and use, do not involve the future but the present.

(e) Correlation Does Not Imply Cause

It seems pretty self-explanatory, but it's not always easy to understand exactly what this phrase means until you examine it carefully. First of all, it is important to understand what a correlation is and what a causation is. A correlation is a mutual relationship or a connection between two variables. Causation is the relationship between cause and effect. So, when a cause results in an effect, that's a causation. In other words, correlation between two events or variables simply indicates that a relationship exists, whereas causation is more specific and says that one event actually causes the other.

When we say that correlation does not imply cause, we mean that just because you can see a connection or a mutual relationship between two variables, it doesn't necessarily mean that one causes the other. Of course, it might be the case that one event or variable causes the other, but we can't know that by looking at the correlation alone. More research would be necessary before that conclusion could be reached.

(c) Types of data structures

1. Arrays- An array stores a collection of items at adjoining memory locations. Items that are the same type get stored together so that the position of each element can be calculated or retrieved easily. Arrays can be fixed or flexible in length.

2. Trees- A tree stores a collection of items in an abstract, hierarchical way. Each node is linked to other nodes and can have multiple sub-values, also known as children.

3. Graphs- A graph stores a collection of items in a non-linear fashion. Graphs are made up of a finite set of nodes, also known as vertices, and lines that connect them, also known as edges. These are useful for representing real-life systems such as computer networks.

4. Hash tables- A hash table, or a hash map, stores a collection of items in an associative array that plots keys to values. A hash table uses a hash function to convert an index into an array of buckets that contain the desired data item.

Basic data types

In finance, the classes int, float, and string provide the atomic data types.

Standard data structures

The classes tuple, list, dict, and set have many application areas in finance, with list being the most flexible workhorse in general.

Arrays

A large class of finance-related problems and algorithms can be cast to an array setting; NumPy provides the specialized class numpy.ndarray, which provides both convenience and compactness of code as well as high performance.

This chapter shows that both the basic data structures and the NumPy ones allow for highly vectorized implementation of algorithms. Depending on the specific shape of the data structures, care should be taken with regard to the memory layout of arrays. Choosing the right approach here can speed up code execution by a factor of two or more.


Related Solutions

Describe the difference between a one tailed and a two tailed test. What is the difference...
Describe the difference between a one tailed and a two tailed test. What is the difference between a z test and a t test, and how do you determine which one to use? Also, discuss when a two sample test would be used, and provide an example.
Describe the difference between a one tailed and a two tailed test. What is the difference...
Describe the difference between a one tailed and a two tailed test. What is the difference between a z test and a t test, and how do you determine which one to use? Also, discuss when a two sample test would be used, and provide an example.
whats the difference between a one-tailed and two-tailed experiment? when would i run a one-tail test...
whats the difference between a one-tailed and two-tailed experiment? when would i run a one-tail test and when would i run a two-tail? can you give an example?
In most research situations, we use a two-tailed test instead of a one-tailed test (even in...
In most research situations, we use a two-tailed test instead of a one-tailed test (even in the case of a directional hypothesis). Why?
1. Why would a researcher need to use a two-tailed test vs. a one-tailed test? 2.A...
1. Why would a researcher need to use a two-tailed test vs. a one-tailed test? 2.A scholar tests the following hypothesis:  Females have a greater number of delinquent peers than males.  In her test, she calculates a t value is -2.349.  Why would it be unnecessary to compare this test statistic to a critical t value?
1. Indicate which of the following hypotheses are one or two tailed and if one tailed,...
1. Indicate which of the following hypotheses are one or two tailed and if one tailed, indicate which side of the graph the tail would be found: a. Having a pet reduces high blood pressure b. Giving people more office space will modify their work habits c. People who are taller make more money d. Drinking coffee will affect a person heart rate please help, thanks!
Consider using a one-tailed as well as a two-tailed test of a null hypothesis regard- ing...
Consider using a one-tailed as well as a two-tailed test of a null hypothesis regard- ing an estimated regression coefficient. For the same significance level, which test is more stringent? In other words, for which test does rejection of the null hypothesis automatically imply rejection in the other test as well, but not vice versa? Explain.
Briefly describe a one-tailed vs two-tailed t-test in the context of hypothesis testing?
Briefly describe a one-tailed vs two-tailed t-test in the context of hypothesis testing?
Identify whether each of the situations below is a one-tailed or two-tailed test. Next identify the...
Identify whether each of the situations below is a one-tailed or two-tailed test. Next identify the dependent variable. Then write the research and null hypothesis in symbols (i.e. H1: µ. . . =/> etc . . .). You should clearly identify the two groups using subscripts after each µ. You are interested in finding out whether the average household income of Washington residents is different from the national average for households in other states. You hypothesize that students at liberal...
When do you use a one-tailed test? When do you use a two-tailed test? How is...
When do you use a one-tailed test? When do you use a two-tailed test? How is SPSS used to perform the calculations needed for each?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT