Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab 2 - T-tests In this lab, we will be using the autosubset.dta dataset. This dataset contains data on automobiles in 1978. We are interested

Lab 2 - T-tests

In this lab, we will be using the autosubset.dta dataset. This dataset contains data on automobiles in 1978. We are interested in looking at differences of gas mileage between domestic cars and foreign cars. Our hypothesis that we want to test is that there is a difference in gas mileage between domestic cars and foreign cars.

  1. After loading the dataset into Stata, usedescribe to get an overview of the dataset. Identify which variables are going to be our dependent variable (DV) and independent variable (IV) for the research situation above. (0.5 point)

  1. Usecodebook for both the IV and DV. What type of variable is the dependent variable? What type of variable is the IV? (don't just use numeric, I want to know if the variable is a ratio, interval, ordinal or nominal variable) (1 point)

  1. Let's look at the summary statistics by using thesummarize command on the DV. What is the mean and SD of the DV? (0.5 point)

  1. However, this will only give us summary statistics for the DV across the entire sample. I want to look at summary statistics for the DV separated by the IV. We will do this by usingby. Using the command used previously, addby IV: to the front of the code. If you get an error, replaceby withbysort. Run this and this should give you two outputs for summary statistics of the DV by the IV.
    1. What is the average fuel mileage for domestic cars? (0.5 point)

  1. What is the average fuel mileage for foreign cars? (0.5 point)

  1. Let's look at the mean differences using graphs. Let's start with a bar graph. Use thegraph bar command to display the average fuel mileage over the IV. Usehelp graph bar if you need help with the code.
    1. Save the graph as a .png and insert it into this file. (1 point)

  1. I want to visualize the variability of the gas mileage over the IV. Use thegraph box command to generate a box plot of gas mileage over the IV. Save the graph as a .png and insert it into this file. (1 point)

  1. It's finally time to run our t-test. But first, state the null hypothesis using mathematical notation for the t-test we want to conduct. (0.5 point)

  1. Now interpret the null hypothesis in plain English (0.5 point)

  1. Now state the alternative hypothesis both in notation and in plain English (1 point)

  1. For this test, we will set alpha to 0.05 (this is the default in Stata). Interpret alpha: (1 point)

  1. Finally, it's time to run our t-test. Use thettestcommand to conduct a t-test to test our hypothesis. Usehelp ttest to find the correct syntax for the command.Use the output of the t-test and answer the following questions:
    1. Report the results of your t-test using APA format. (1 point)

  1. Interpret p and what can you conclude in terms of the null hypothesis? (1 point)

  1. Report the 95% confidence interval using APA format. (0.5 point)

  1. Use theesize command to find the effect size. Use the same code used for the t-test but replace thettest command withesize twosample. Report Cohen's d. (0.5 point)

  1. Using the information from this lab, briefly report the results of the t-test as if writing for an APA formatted article (4 points). But sure to include the following:
    1. Means and standard deviations of mileage for both groups.
    2. t-test results with 95% confidence intervals and Cohen's d

Here is the data:

117LSF

G27 Jun 2014 13:58

(c%

V make20pricesmpglrep78headroomtrunknweightelengthturnng_circledisplacementgear_ratioforeignidried %-18s%8.0gc%8.0g%8.0g%%8.0gc%8.0g%8.0gc%8.0g%8%8.0g%8.0g%6.2f%8.0g%8.0g%6.1f%8.0g%8.0gc%8.0g%8.0g%8.0g%6.2f%8.0g%9.0gtcH%8.0g%tcH%8.0g%tcH%8.0g%tcH%8.akenakeodelurationivisionivisionivisionipsnesnooriginarriedAPDKNAMake and Model"B0T@`Q

BPT@Pricend Model"B0T@`Q

BPT@Mileage (mpg)"B0T@`Q

BPT@Repair Record 1978B0T@`Q

BPT@Headroom (in.)978B0T@`Q

BPT@Trunk space (cu. ft.)0T@`Q

BPT@Weight (lbs.)u. ft.)0T@`Q

BPT@Length (in.)u. ft.)0T@`Q

BPT@Turn Circle (ft.) .)0T@`Q

BPT@Displacement (cu. in.)0T@`Q

BPT@Gear Ratiot (cu. in.)0T@`Q

BPT@Car typeot (cu. in.)0T@`Q

BPT@ar typeot (cu. in.)0T@`Q

BPT@D_dtanotenote0T@-B1h_dtanotenote1T@-Bfrom Consumer Reports with permissionAMC Concord

@ r (ye@?AMC Spirit @@ P #yE@@@Buick C..@ (...;@@Buick Electra"@+^q=@@Buick L..@V +R.@@Buick R..@ *...;@ABuick R..`@(+...;@ABuick Skylark`@

H

*E@ ACad. D..@,...@0ACad. Eldorado8 [1]`@<+^( @@ACad. Seville">@@<..\@PAChev. Impalae

I@..#@pAChev. M..`@l R.@AChev. Monte C..]@" )R.@AChev. M..]@ (R.@AChev. NovaCarlos`@

f

+ #@ADodge ColtCarlo@H#b\b@ADodge D..@ .>{@ADodge M..@ .>{@ADodge St. R..@ .(<@AFord Fiestagiso%

? "!bI@AFord Mustangiso[@<..E@ALinc. Continental, `@.@ALinc. Mark Vntal5 @..@ALinc. V..`@ ).{@AMerc. Bobcatles @@ ...@AMerc. C..`@0.0@AMerc. M..`@ ,.@AMerc. Monarches@@*...@BMerc. XR-7rles

@@"..0@BMerc. Zephyres `@ +E@BOlds 98onadosn"@+^q=@ BOlds Cutl S..@ *...;@BOlds C..@ *...;@BOlds Delta 8..@j *R.@BOlds Omega88sU@ *

+E@BOlds S..c@ (R.@ BOlds Toronados(

`@..=@$BPlym.Arrowos'@<..C@(BPlym. ChamposI" @<..;@,BPlym. Horizons@..W@0BPlym. SapporosV? .b@4BPlym. Volares[1]@[..N@8BPont. C..@t *R.@

*E@@BPont.Grand P..>@ -...;@DBPont. Le M..`@ (...;@HBPont. PhoenixixH`@<..E@LBPont. S..]@ )R.@PBAudi 5000irdix%@@ %L@TBAudi Foxbirdix

@ $al@XBBMW 320iirdix&@ Z "yh@\BDatsun 200rdixU?B #wx@`BDatsun 210rdix#@ Ul@dBDatsun 510rdix@"w\b@hBDatsun 810rdix@ &'33c@lBFiat Stradadix@R$iW@pBHonda Accordix@@ $k33C@tBHonda Civicix"@"[33S@xBMazda GLCcix`@ !VRn@|BPeugeot 604ix2 `@ \

&e@BRenault Le Carx7

@@ &"O{n@BSubaru Le Carx # @ [1]$a s@BToyota Celicax @ j $ C@BToyota Corollax @@ #apM@BToyota CoronaxW@ n $33C@BVW Dasheroax@ p$a)\o@BVW Dieselonax)@@#Z...q@BVW RabbitonaxY@@#Y...q@BVW S..@$a...q@'BVolvo 260oax. @ b %R>@"B)originyB|@`Q[1] DomesticForeign

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Theory Of Distributions

Authors: Svetlin G Georgiev

1st Edition

3319195271, 9783319195278

More Books

Students also viewed these Mathematics questions

Question

What is a dummy variable?

Answered: 1 week ago

Question

1. What will happen in the future

Answered: 1 week ago

Question

3. Avoid making mistakes when reaching our goals

Answered: 1 week ago