Question

In: Statistics and Probability

Write code in SAS to do each of the following I have posted the data below...

Write code in SAS to do each of the following I have posted the data below from a pace delimited data set consisting of 66 randomly selected cars

  1. Upload the data set to SAS and store it as a SAS data set called cars. Make sure the full values are stored for all character variables.
  2. Create a comparative bar chart (with appropriate title and labels) displaying the brands of each car by fuel type (so that fuel type is on the x-axis). Do not stack the bars.
  3. Write a program to determine the mean, variance, 20th percentile, and mode (and only those statistics) of the KMs and Price variables.
  4. Perform a hypothesis test to determine if the mean price of cars with the petrol fuel type differs from the mean price of cars with the CNG fuel type.
  5. Run a regression analysis using Price as the dependent variable and KMs as the independent variable such that 90% confidence intervals on the coefficients are included.
"Brand" "Condition" "Fuel" "KMs" "Model" "Price" "City" "Transaction" "Year"
"Daihatsu" "New" "Petrol" 19000 "Move" 1125000 "Karachi" "Cash" 2014
"Mazda" "Used" "Petrol" 89999 "Azwagon" 799999 "Karachi" "Cash" 2007
"Toyota" "Used" "Petrol" 140000 "Prius" 1225000 "Karachi" "Cash" 2007
"Toyota" "Used" "Petrol" 95000 "Corrolla Altis" 995000 "Karachi" "Cash" 1995
"Toyota" "Used" "Petrol" 61000 "Passo" 1150000 "Karachi" "Cash" 2012
"Suzuki" "Used" "Petrol" 100000 "Alto" 380000 "Karachi" "Cash" 2001
"Toyota" "Used" "Petrol" 86000 "Passo" 1650000 "Karachi" "Cash" 2015
"Suzuki" "New" "Petrol" 130000 "Alto" 525000 "Karachi" "Cash" 2001
"Nissan" "Used" "Petrol" 100000 "Tiida" 875000 "Karachi" "Cash" 2007
"Honda" "Used" "Petrol" 182000 "Civic EXi" 720000 "Karachi" "Cash" 2004
"Daihatsu" "Used" "Petrol" 85000 "Other" 625000 "Karachi" "Cash" 2011
"Suzuki" "Used" "Hybrid" 78523 "Alto" 545000 "Karachi" "Cash" 2010
"Suzuki" "Used" "CNG" 105000 "Mehran VX" 255000 "Karachi" "Cash" 2000
"Suzuki" "Used" "CNG" 100000 "Khyber" 135000 "Karachi" "Cash" 1989
"Other Brands" "New" "CNG" 660 "Other" 250000 "Karachi" "Cash" 1993
"Nissan" "New" "Petrol" 97000 "Dayz" 985000 "Karachi" "Cash" 2015
"Suzuki" "Used" "Petrol" 35000 "Cultus VXR" 580000 "Karachi" "Cash" 2008
"Toyota" "Used" "CNG" 127000 "Corolla GLI" 1390000 "Karachi" "Cash" 2012
"Suzuki" "Used" "CNG" 20880 "Mehran VXR" 430000 "Karachi" "Cash" 2011
"Suzuki" "Used" "Petrol" 88000 "Every" 885000 "Karachi" "Cash" 2012
"Suzuki" "Used" "CNG" 60000 "Mehran VXR" 150000 "Karachi" "Cash" 1998
"Toyota" "Used" "Petrol" 118000 "Corolla XLI" 975000 "Karachi" "Cash" 2008
"Honda" "New" "Petrol" 80999 "Civic VTi" 350000 "Karachi" "Cash" 1995
"Daihatsu" "Used" "Petrol" 10000 "Mira" 1500000 "Karachi" "Cash" 2017
"Toyota" "New" "CNG" 80000 "Corolla XLI" 1250000 "Islamabad" "Cash" 2005
"Toyota" "Used" "Petrol" 120000 "Prado" 5500000 "Karachi" "Cash" 2007
"Daihatsu" "New" "Petrol" 68000 "Mira" 1100000 "Karachi" "Cash" 2014
"Suzuki" "Used" "CNG" 123456 "Cultus VXR" 470000 "Karachi" "Cash" 2003
"Suzuki" "Used" "Petrol" 95000 "Mehran VX" 325000 "Gujranwala" "Cash" 2003
"Toyota" "Used" "Petrol" 127000 "Corolla GLI" 1150000 "Karachi" "Cash" 2009
"Suzuki" "Used" "CNG" 50000 "Cultus VXR" 430000 "Karachi" "Cash" 2003
"Mitsubishi" "New" "Petrol" 100000 "Pajero Mini" 500000 "Karachi" "Cash" 1998
"Suzuki" "Used" "Petrol" 8884 "Swift" 795000 "Karachi" "Cash" 2011
"Daihatsu" "Used" "Petrol" 22500 "Mira" 1250000 "Karachi" "Cash" 2016
"Honda" "Used" "Petrol" 560800 "Civic EXi" 240000 "Karachi" "Cash" 1990
"Suzuki" "Used" "CNG" 114000 "Alto" 595000 "Karachi" "Cash" 2011
"Suzuki" "Used" "Petrol" 35000 "Wagon R" 1200000 "Karachi" "Cash" 2014
"Suzuki" "Used" "CNG" 111111 "Mehran VX" 200000 "Karachi" "Cash" 1996
"Toyota" "Used" "CNG" 123 "Estima" 650000 "Karachi" "Cash" 1993
"Suzuki" "Used" "CNG" 14500 "Alto" 420000 "Karachi" "Cash" 2008
"Suzuki" "Used" "CNG" 10000 "Alto" 435000 "Karachi" "Cash" 2004
"Suzuki" "New" "CNG" 5 "Mehran VX" 250000 "Karachi" "Cash" 2003
"Toyota" "New" "Petrol" 59000 "Prado" 6000000 "Karachi" "Cash" 2009
"Suzuki" "Used" "Petrol" 28000 "Swift" 1400000 "Karachi" "Cash" 2015
"Hyundai" "Used" "Petrol" 70000 "Santro" 515000 "Karachi" "Cash" 2007
"Suzuki" "New" "Petrol" 45000 "Mehran VXR" 480000 "Karachi" "Cash" 2012
"Suzuki" "Used" "CNG" 2500 "Margalla" 335000 "Karachi" "Cash" 1996
"Daihatsu" "Used" "Petrol" 113000 "Cuore" 555000 "Karachi" "Cash" 2005
"Toyota" "Used" "Petrol" 84000 "Other" 1300000 "Karachi" "Cash" 2005

Solutions

Expert Solution

Performed t test to compare cng and petrol and found p value less than 0.05 and hence we reject the claim that the mean price of cars with the petrol fuel type do not differ from the mean price of cars with the CNG fuel type

Hope the above answer has helped you in understanding the problem. Please upvote the ans if it has really helped you. Good Luck!!


Related Solutions

How do I add the information below to my current code that I have also posted...
How do I add the information below to my current code that I have also posted below. <!DOCTYPE html> <html> <!-- The author of this code is: Ikeem Mays --> <body> <header> <h1> My Grocery Site </h1> </header> <article> This is web content about a grocery store that might be in any town. The store stocks fresh produce, as well as essential grocery items. Below are category lists of products you can find in the grocery store. </article> <div class...
I need the code in SAS and R and outputs please 2. The data below come...
I need the code in SAS and R and outputs please 2. The data below come from a study investigating a method of measuring body composition, and give the body fat percentage (% fat), age and sex for 18 adults aged between 23 and 61 years. Source: Mazess, R.B., Peppler, W.W., and Gibbons, M. (1984) Total body composition by dual-photon (153GD) absorptiometry. American Journal of Clinical Nutrition, 40, 834-839. age % fat sex 23 9.5 male 23 27.9 female 27...
I am trying to do edge detection using matlab. I have posted code here. It does...
I am trying to do edge detection using matlab. I have posted code here. It does not give any error but it's not running it at all. So please help me to fix it and also exaplin each line of this code pls. Thanks! i = imread('C:\Users\Amanda\Desktop"); I = rgb2gray(1i); BW1 = edge(I,'prewitt'); BW2= edge(I,'sobel'); BW3= edge(I,'roberts'); subplot (2,2,1); imshow(I); title('original'); subplot(2,2,2); imshow(BW1); title('Prewitt'); subplot(2,2,3); imshow(BW2); title('Sobel'); subplot(2,2,4); imshow(BW3); title('Roberts');
I Have posted my Java code below. Fix the toString, add, and remove implementations so that...
I Have posted my Java code below. Fix the toString, add, and remove implementations so that the following test cases work. Note: I have removed all the unnecessary inherited List implementations. I have them to: throw new UnsupportedException(); For compilation, you could also add //TODO. Test (Main) List list = new SparseList<>(); list.add("0"); list.add("1"); list.add(4, "4"); will result in the following list of size 5: [0, 1, null, null, 4]. list.add(3, "Three"); will result in the following list of size...
I have posted this earlier, but it seems that the code part was cutoff, therefore, this...
I have posted this earlier, but it seems that the code part was cutoff, therefore, this is re post with full code. In the program the "case: 'C'" doesn't seem to function correctly, We were told to write a book tracking program, and it takes inputs and once all the book info such as ISBN, date, author, course number, etc are put in then input, then we can print them out, by using the print functions that are defined in...
I have do calculate ratios for the company Generals Mills and I have the link posted...
I have do calculate ratios for the company Generals Mills and I have the link posted below for the financial statements from thier website. I need work shown with the answers to get full grade so please post that too. Thank you https://s22.q4cdn.com/584207745/files/doc_financials/2018/annual/FINAL-2018-Annual-Report.pdf You are the newly appointed treasurer and your partner is the newly appointed controller of your company. In order to learn more about your company, you have decided to analyze the company’s financial performance over the last...
What does the RISC-V code below do? Write the C equivalent. Assume that i is in...
What does the RISC-V code below do? Write the C equivalent. Assume that i is in register x5 and that the base address of array A that holds doubleword integers is in x20. addi x5, x0, 0 addi x6, x0, 50 addi x28, x20, 0 loop: bge x5, x6, end ld x7, 0(x28) bge x7, x0, next sub x7, x0, x7 sd x7, 0(x28) next: addi x5, x5, 1 addi x28, x28, 8 jal x0, loop end: Can you rewrite...
I have to complete all //to do comments for the following code: /** * A ShoppingBasket...
I have to complete all //to do comments for the following code: /** * A ShoppingBasket holds zero or more Products and can provide information * about the Products. One can add Products to a ShoppingBasket during its * lifetime, reset the ShoppingBasket, create a copy which contains Products of * at least a certain value, and make various queries to the ShoppingBasket. * (Thus, the number of Products that will be stored by a ShoppingBasket object * is not...
PLEASE WRITE IN C++ PROGRAM THANKS - QUEUES Please study the code posted below. Please rewrite...
PLEASE WRITE IN C++ PROGRAM THANKS - QUEUES Please study the code posted below. Please rewrite the code implementing a template class using a linked list instead of an array. Note: The functionality should remain the same /** * Queue implementation using linked list C style implementation ( no OOP). */ #include <cstdio> #include <cstdlib> #include <climits> #include <iostream> #define CAPACITY 100 // Queue max capacity using namespace std; /** Queue structure definition */ struct QueueType { int data; struct...
I have the following assignment for probability class: I am supposed to write a routine (code)...
I have the following assignment for probability class: I am supposed to write a routine (code) in MATLAB that does solve the following problem for me: a) Generate N=10000 samples of a Uniform random variable (X) using the rand () command. This Uniform RV should have a range of -1 to +3. b) Generate (Estimate) and plot the PDF of X from the samples. You are not allowed to use the Histogram () command, any commands from the Matlab Statistics...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT