Why is it important to consider the power of a test when designing a study?
- To ensure the study can detect an effect if it exists
- To ensure the study does not detect an effect if it does not exist
- To maximize the chance of a Type I error
- To minimize the chance of a Type I error
The power of a test is the ability of the test to detect an effect if it truly exists. It's the probability that the test correctly rejects a false null hypothesis. High power is desirable because it means the test is less likely to make a Type II error (false negative). When designing a study, it's important to choose a sample size and significance level that will provide enough power to detect an effect if one exists.
If A and B are independent events, the probability of both occurring is ________.
- P(A + B)
- P(A / B)
- P(A ∩ B)
- P(A ∪ B)
If A and B are independent events, the probability of both occurring is P(A ∩ B) which is equal to P(A) * P(B). This is the fundamental characteristic of independent events in probability.
How does sample size affect the width of a confidence interval?
- Increasing the sample size decreases the width of the confidence interval
- Increasing the sample size has no effect on the width of the confidence interval
- Increasing the sample size increases the width of the confidence interval
- The relationship between sample size and the width of the confidence interval is unpredictable
Increasing the sample size decreases the width of the confidence interval. The larger the sample size, the more information you have, and thus the less uncertainty (which translates into a smaller standard error and narrower confidence interval).
What is the null hypothesis in the Mann-Whitney U test?
- The groups have different variances
- The groups have equal variances
- There is a significant difference between the groups
- There is no significant difference between the groups
In the Mann-Whitney U test, the null hypothesis is that there is no significant difference between the groups. More specifically, it states that the probability that a randomly selected value from the first group is greater than a randomly selected value from the second group is equal to 0.5.
What type of data is used in the Chi-square test for goodness of fit?
- Categorical data
- Continuous data
- Interval data
- Ordinal data
The Chi-square test for goodness of fit is used with categorical data. It compares the observed frequencies in each category with the frequencies we would expect to see if the data followed the theoretical distribution.
What can be inferred if the residuals are not randomly distributed in the residual plot?
- The data has no outliers
- The data is perfectly linear
- The linear regression model is a perfect fit for the data
- The linear regression model is not a good fit for the data
If the residuals are not randomly distributed (e.g., if they form a pattern), it suggests that the linear regression model is not a good fit for the data. This could be because the relationship between the variables is not linear, or because the data exhibits heteroscedasticity (unequal variances of errors), among other reasons.
What is the error term in a simple linear regression model?
- It is the dependent variable
- It is the difference between the observed and predicted values
- It is the independent variable
- It is the slope of the regression line
The error term in a simple linear regression model is the difference between the observed and predicted values. It captures the variability in the dependent variable that is not explained by the independent variable in the model.
What's the difference between a histogram and a bar plot?
- Bar plots are for continuous data, histograms for categorical data
- Both are for continuous data only
- Histograms are for continuous data, bar plots for categorical data
- There is no difference
The main difference between a histogram and a bar plot is the type of data they represent. A histogram is used for continuous data, where the bins represent ranges of data, while a bar plot is used for categorical data to compare the frequency or count of different categories.
The ________ function in CodeIgniter can be used to load libraries, helpers, or custom config files within a controller.
- import
- include
- load
- require
The load function in CodeIgniter is used to load libraries, helpers, or custom config files within a controller. This enables the use of additional resources, enhancing the functionality of the controller.
What is the primary purpose of the 'application' directory in CodeIgniter?
- CSS and JavaScript files
- Configuration and customization
- Controller classes
- Database schema
The 'application' directory in CodeIgniter is primarily used for configuration and customization. It houses files related to controllers, models, views, and other application-specific components. This directory is crucial for organizing and managing the core functionality of a CodeIgniter application.
________ is a common format for transmitting data in social media integrations, particularly for APIs.
- CSV
- JSON
- SOAP
- XML
JSON (JavaScript Object Notation) is commonly used for transmitting data in social media integrations and APIs due to its lightweight and human-readable format. It is easy to parse and generate, making it a popular choice for data exchange.
To create a user-defined exception, one must usually extend the ________ class.
- BaseException
- CustomException
- Error
- Exception
To create a user-defined exception, one must usually extend the Exception class. By extending this base class, developers can define their own custom exceptions with specific behaviors, making the code more modular and maintainable.