Question

stion 18 marks In a study concerned with the effects of smoking on blood pressure, the smoking status (Yes- 1, No -0) and sys

2 F 500x2 table SystolicBP S oke 133 115 140 132 133 138 133 67 138 130 103 137

*** do not solve the question

*** i have uploaded the data to matlab, show how do i code to run ttest for this question (provide exact codes)  

THxxxxxxxxxxxxxxxxxxxxxxxxx

stion 18 marks In a study concerned with the effects of smoking on blood pressure, the smoking status (Yes- 1, No -0) and systolic blood pressure (mmHg) were recorded for 500 randomly selected people. The purpose of the following analysis is to determine whether the systolic blood pressure of smokers is significantly different from that of non-smokers. The data are available on MyUni in the file BP.csv (a) Explain briefly why the data should be treated as two independent samples rather than paired (b) Use MATLAB to perform a two-independent sample t-test. State the value of the test statistic, the reference distribution with appropriate degrees of freedom, and the P-value. Do you reject or retain the null hypothesis at the 5% level of significance? Make sure to include the code you used in MATLAB to run the test, along with the output (do NOT include any code used to import/write out data) (c) Determine if the assumptions of the test are met. Include any plots you produce to support your comments, and comment on the validity of the P-value you obtained in Part (b)
2 F 500x2 table SystolicBP S oke 133 115 140 132 133 138 133 67 138 130 103 137
0 0
Add a comment Improve this question Transcribed image text
Answer #1

a)

Let me first quote an example of paired sample and two independent samples

Suppose a manufacturing company has manufactured two drugs namely drug A and drug B and the company is interested to know which drug is best by administering the drug to rats, this can be done in two ways

i) One is by taking one group of rats and administering them with drug A and observing the result. Then for a short span of time these rats are not administered with any drug (this short span of time which we call the "wash-out" period (So that the effect of drug A vanishes completely)). After the wash-out period the same group of rats are administered with drug B and the effects of the drugs are observed. In this scenario the two drugs are administered on the same group of rats. In this case the the data collected on the rats when administering the drugs is called as paired sample

ii) Another way is by taking 2 different groups of rats and administering drug A to the first group of rats and administering drug B to the second group of rats and then observing the effect of the drug A and drug B on group 1 and group 2 respectively. In this case we have two independent groups of rats and the data collected on these two groups in called as two independent samples

In the above data of smokers and non smokers the two groups should be treated as two independent samples rather than paired, because smokers and non smokers are two independent categories.

b)

The data for this question is not provided, however the procedure for the test is as follows.

First do the F test (where Ho : Variance of systolic blood pressure of the two groups are equal)

CASE 1 : If the p-value of F test is greater that 0.05 then we accept the null hypothesis (Variance of systolic blood pressure of the two groups are equal) and we do the two independent sample t-test using the following MATLAB code

[h,p] = ttest2(x,y,'Vartype','unequal')

Where x and y are the systolic blood pressure of group A and group B respectively.

The output will have h and p values

If h = 1, this indicates the rejection of the null hypothesis at the Alpha significance level.

If h = 0, this indicates a failure to reject the null hypothesis at the Alpha significance level.

If the p-value of this test is greater that 0.05 then we accept the null hypothesis (The mean systolic blood pressure of the smokers and non smokers are the same groups are equal)

CASE 2 : If the p-value of F test is lesser that 0.05 then we reject the null hypothesis (Variance of systolic blood pressure of the two groups are not equal) and we do the two independent sample t-test using the following MATLAB code

[h,p] = ttest2(x,y)

Where x and y are the systolic blood pressure of group A and group B respectively.

The output will have h and p values

If h = 1, this indicates the rejection of the null hypothesis at the Alpha significance level.

If h = 0, this indicates a failure to reject the null hypothesis at the Alpha significance level.

If the p value of this test is greater that 0.05 then we accept the null hypothesis (The mean systolic blood pressure of the smokers and non smokers are the same groups are equal)

c)

One of the assumptions is regarding the variance which I have explained in the previous subdivision

Another assumption is that the data follows normality using the Q- Q plot. Or ks test for normality can be done.

The two samples are drawn from two independent samples

Add a comment
Know the answer?
Add Answer to:
*** do not solve the question *** i have uploaded the data to matlab, show how do i code to run t...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Appreciate the process in detail and the matlab code please leave an email address ,I will send i...

    appreciate the process in detail and the matlab code please leave an email address ,I will send it to you Question 1 8 marks In a study concerned with the effects of smoking on blood pressure, the smoking status (Yes 1, No-0) and systolic blood pressure (mmHg) were recorded for 500 randomly selected people. The purpose of the following analysis is to wetermine whether the systolic blood pressure of smokers is significantly different from that of non-smokers. The data are...

  • Question 1 marks In a study concerned with the effects of smoking on blood pressure, the smoking ...

    Question 1 marks In a study concerned with the effects of smoking on blood pressure, the smoking status (Yes - 1, No and systolic blood pressure (mmHg) were recorded for 500 randomly selected people. The purpose of the following analysis is to determine whether the systolic blood pressure of smokers is significantly different from that of non-smokens. The data are available on MyUni in the file BP.csv. (a) Explain briefly why the data should be treated as two independent samples...

  • MATLAB HELP I need help generating random age(x) and average systolic blood pressure(y) values or data similar to the table below in matlab. i need 75 reading or data points for both and plot of age(x...

    MATLAB HELP I need help generating random age(x) and average systolic blood pressure(y) values or data similar to the table below in matlab. i need 75 reading or data points for both and plot of age(x) against blood pressure(y). The age should be a number e.g 1, 22, 13,... and not 15 to 90, 20-24 like the chart shows for easy plotting. also the age and blood pressure show be in increasing order like the table below. Please attach matlab...

  • Numerical Analysis Matlab Use single - variable method Write a matlab code to show how do...

    Numerical Analysis Matlab Use single - variable method Write a matlab code to show how do you run this algorithm Given the function ƒ(x) = sin(x) - e^x + 2 Find the minimum value in [a, b]=[-1, 3]. Starting from the leftmost end point and move toward to rightmost end point (i.e forth) with your first ∆x = (b - a)/4 = (3 - (-1))/4 = 1 Stop the iteration when your ∆x ≤ 0.01

  • please do this problem in matlab and show me the code. Thanks. please do this problem...

    please do this problem in matlab and show me the code. Thanks. please do this problem in matlab and show me the code. Thanks. please do this problem in matlab and show me the code. Thanks. please do this problem in matlab and show me the code. Thanks. please do this problem in matlab and show me the code. Thanks.please do this problem in matlab and show me the code. Thanks. please do this problem in matlab and show me...

  • MATLAB question: I have some data on excell and I have to write a code that...

    MATLAB question: I have some data on excell and I have to write a code that does the following: Please use dummy data for your convenience. Thank you in advance for your help! Read from Data_all.xlsx Sheet “Wave_data", your specific Wave Height (WH) measurements and using a "for loop" and "if-elseif-else" command, count the number of measurement in the following ranges: a. WH= 0 or 1 m b. WH=2 or 3 m c. WH=4 or 5 m d. WH=6 or...

  • Please solve and show answers so I can do it on my own Use the following...

    Please solve and show answers so I can do it on my own Use the following information to answer questions 15 through 24 The systolic blood pressure of individuals is thought to be related to both age and weight. A random sample of 11 men was taken. The Data and the Excel computer output for the multiple regression problem is given below Pressure Age Weight 132 143 153 162 154 168 137 149 159 128 166 52 59 67 73...

  • I do not know how make dot plots. I have the plots but do not know the code for R. Help me with t...

    I do not know how make dot plots. I have the plots but do not know the code for R. Help me with the code please 1. A dairy scientist is testing a new feed additive. She chooses 13 cows at random from a large population of cows. She randomly assigns mold 8 to get the old dict, and nnew-5 to get the new diet including the additive. The cows are housed in 13 separated pens and each gets separate...

  • MATLAB question: I have written a code to solve for a metals resitance. Here is the...

    MATLAB question: I have written a code to solve for a metals resitance. Here is the problem statement: Part 1 (Algorithms) – due Friday: Think about how you might solve the problem of calculating the resistance of a given group of metals depending on the type of metal, the length of the wire and the area of the wire (if given the diameter only – so you must calculate the area). Write instructions (an algorithm) for a script that behaves...

  • The data studies the effect of dietary calcium on blood pressure. In the experiment, one group...

    The data studies the effect of dietary calcium on blood pressure. In the experiment, one group of black male adults received calcium supplements for 12 weeks. A control group of black male adults was given placebos for 12 weeks. Earlier tests indicated that calcium could be more effective in the black population. The data are seated systolic blood pressure at the beginning and end of the 12 weeks measured in mm Hg. The data include the decrease after 12 weeks...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT