In: Statistics and Probability
Using the Chi-Square test for the difference between two proportions, determine (?=0.05) if there is a difference in population proportion between male patients using Medicare as their Payer versus female patients using Medicare as their Payer. Be sure to set up the null and alternate hypotheses.
Using the Patients dataset, determine if there is a relationship between length of stay and total charges. Your answer should include the following:
Scatter Plot
Linear Regression Equation (with interpretation)
Coefficient of Determination (with interpretation)
Coefficient of Correlation (with interpretation)
Please include the Excel Formulas.
Length of Stay | ICU Days | Age (Years) | Sex (M/F/U) | Principal Payer | Total Chges | Drug Charges | Lab Charges | Imaging Charges | RT Chge |
3 | 0 | 78 | F | CARE | $ 5,418.85 | $ 68.70 | $ 273.50 | $ 832.00 | $ 660.85 |
3 | 0 | 74 | F | CARE | $ 4,575.10 | $ 58.65 | $ 439.50 | $ 725.00 | $ 276.50 |
11 | 0 | 89 | M | CARE | $ 12,031.18 | $ 230.28 | $ 816.50 | $ 187.00 | $1,312.30 |
3 | 0 | 81 | M | CARE | $ 3,617.84 | $ 142.89 | $ 387.00 | $ 93.50 | $ 231.95 |
9 | 0 | 87 | F | CARE | $ 12,806.88 | $ 889.23 | $ 795.50 | $ 827.50 | $1,526.35 |
3 | 0 | 65 | CARE | $ 5,295.55 | $ 102.50 | $ 837.00 | $ 959.50 | $ 177.45 | |
3 | 0 | 90 | M | CARE | $ 3,453.21 | $ 122.15 | $ 323.00 | $ 103.00 | $ 23.45 |
3 | 0 | 61 | M | BC | $ 1,760.03 | $ 161.18 | $ 35.00 | $ - | $ 303.85 |
3 | 0 | 90 | F | CARE | $ 3,290.40 | $ 235.65 | $ 243.00 | $ 117.50 | $ 446.55 |
5 | 0 | 78 | M | CARE | $ 6,253.65 | $ 103.05 | $ 487.50 | $ 941.00 | $ - |
3 | 0 | 78 | F | CARE | $ 3,896.16 | $ 229.06 | $ 222.00 | $ 93.50 | $ 477.05 |
2 | 0 | 71 | M | CARE | $ 1,795.35 | $ 52.05 | $ 58.00 | $ 216.00 | $ 39.30 |
3 | 0 | 76 | M | CARE | $ 9,265.17 | $ 211.37 | $1,626.50 | $ 1,255.00 | $ 827.65 |
3 | 0 | 76 | F | CARE | $ 3,282.90 | $ 298.40 | $ 381.50 | $ 214.00 | $ 476.75 |
5 | 0 | 79 | F | CARE | $ 9,565.83 | $ 477.03 | $ 974.00 | $ 214.00 | $2,017.80 |
3 | 0 | 72 | M | CARE | $ 3,782.15 | $ 166.85 | $ 345.00 | $ 93.50 | $ 253.60 |
4 | 1 | 72 | M | CARE | $ 6,384.28 | $ 342.98 | $ 644.85 | $ 307.50 | $ 605.30 |
3 | 0 | 64 | M | CARE | $ 4,904.25 | $ 208.65 | $ 768.00 | $ 832.00 | $ 369.60 |
2 | 0 | 72 | F | CARE | $ 4,169.92 | $ 545.15 | $ 375.50 | $ 557.00 | $ 803.77 |
3 | 0 | 69 | F | CARE | $ 5,204.41 | $ 510.01 | $ 870.50 | $ 158.00 | $ 599.05 |
4 | 0 | 63 | M | HMO | $ 6,740.00 | $ 480.20 | $1,091.50 | $ 925.50 | $ 734.40 |
1 | 0 | 78 | M | CARE | $ 5,016.44 | $ 401.44 | $ 630.00 | $ 158.00 | $ 246.75 |
2 | 0 | 83 | M | CARE | $ 4,178.94 | $ 604.49 | $ 433.50 | $ 1,188.50 | $ 217.05 |
3 | 0 | 62 | F | OTHR | $ 4,105.26 | $ 90.46 | $ 222.00 | $ 725.00 | $ - |
4 | 0 | 71 | M | CARE | $ 4,717.30 | $ 120.90 | $ 496.00 | $ 631.50 | $ - |
6 | 0 | 83 | F | CARE | $ 6,598.92 | $ 380.17 | $ 386.00 | $ 832.00 | $ 226.15 |
2 | 0 | 63 | F | OTHR | $ 1,633.85 | $ 20.85 | $ 207.00 | $ 93.50 | $ 88.30 |
1 | 0 | 83 | M | CARE | $ 2,200.85 | $ 21.00 | $ 176.00 | $ 117.50 | $ 202.75 |
4 | 0 | 76 | F | CARE | $ 7,461.54 | $ 508.34 | $1,082.50 | $ 1,071.50 | $ 340.65 |
5 | 0 | 79 | M | CARE | $ 11,413.23 | $ 1,149.88 | $1,335.50 | $ 267.00 | $1,442.15 |
3 | 0 | 65 | M | CARE | $ 5,607.55 | $ 230.50 | $ 969.35 | $ 738.50 | $ 289.15 |
2 | 0 | 79 | M | CARE | $ 4,850.62 | $ 172.52 | $ 867.00 | $ 845.50 | $ 206.05 |
4 | 0 | 74 | M | CARE | $ 7,102.49 | $ 259.09 | $ 881.00 | $ 780.00 | $ 773.85 |
15 | 0 | 63 | M | OGVT | $ 13,615.69 | $ 438.84 | $1,930.00 | $ 912.00 | $1,911.70 |
3 | 0 | 84 | M | CARE | $ 5,069.18 | $ 282.90 | $ 476.50 | $ 832.00 | $ 345.80 |
6 | 0 | 90 | F | CARE | $ 6,536.07 | $ 122.85 | $ 651.00 | $ 947.50 | $ 458.05 |
4 | 0 | 73 | F | CARE | $ 7,401.25 | $ 216.90 | $ 971.50 | $ 845.50 | $ 562.10 |
2 | 0 | 81 | M | CARE | $ 3,744.34 | $ 176.24 | $ 394.00 | $ 1,291.50 | $ 80.00 |
5 | 0 | 75 | F | CARE | $ 8,653.68 | $ 246.63 | $ 859.00 | $ 767.00 | $ 942.10 |
9 | 0 | 87 | F | CARE | $ 14,423.21 | $ 527.63 | $2,138.00 | $ 925.50 | $1,069.00 |
3 | 0 | 70 | M | CARE | $ 3,742.30 | $ 112.95 | $ 396.50 | $ 93.50 | $ 340.65 |
3 | 0 | 73 | F | CARE | $ 5,514.09 | $ 368.34 | $ 874.50 | $ 200.50 | $ 371.55 |
5 | 0 | 77 | M | CARE | $ 7,390.15 | $ 331.25 | $ 696.00 | $ 825.00 | $ 661.90 |
5 | 0 | 71 | M | CARE | $ 9,358.20 | $ 491.35 | $1,223.50 | $ 1,230.80 | $ 736.95 |
7 | 0 | 76 | M | CARE | $ 14,570.29 | $ 286.74 | $1,090.00 | $ 939.00 | $ 921.80 |
4 | 0 | 49 | F | CAID | $ 4,526.43 | $ 203.98 | $ 378.50 | $ 725.00 | $ 608.95 |
6 | 0 | 78 | F | CARE | $ 6,846.77 | $ 162.57 | $ 657.50 | $ 93.50 | $ 181.00 |
2 | 0 | 86 | M | CARE | $ 2,927.62 | $ 145.42 | $ 606.50 | $ 107.00 | $ 543.10 |
3 | 0 | 67 | M | CARE | $ 4,404.13 | $ 161.78 | $ 630.00 | $ 93.50 | $ 491.10 |
6 | 0 | 69 | M | CARE | $ 8,056.36 | $ 331.66 | $ 642.00 | $ 767.00 | $ 367.15 |
8 | 0 | 73 | F | CARE | $ 10,703.34 | $ 618.64 | $1,297.50 | $ 692.50 | $ 958.30 |
4 | 0 | 88 | F | CARE | $ 16,458.95 | $ 813.55 | $1,050.50 | $ 971.50 | $2,114.60 |
5 | 0 | 67 | M | INS | $ 4,770.10 | $ 236.30 | $ 747.00 | $ 93.50 | $ - |
8 | 0 | 69 | M | CARE | $ 15,282.57 | $ 1,704.77 | $1,860.00 | $ 1,153.00 | $2,221.30 |
7 | 0 | 77 | M | CARE | $ 10,105.30 | $ 597.30 | $1,251.00 | $ 1,304.50 | $ 877.00 |
8 | 0 | 64 | F | CAID | $ 7,871.29 | $ 606.64 | $ 550.00 | $ 200.50 | $ 725.05 |
3 | 0 | 76 | M | CARE | $ 3,411.10 | $ 124.70 | $ 356.50 | $ 187.00 | $ 93.15 |
12 | 0 | 64 | F | CAID | $ 10,962.17 | $ 712.67 | $ 697.00 | $ 321.00 | $1,144.35 |
2 | 0 | 41 | M | SELF | $ 7,374.27 | $ 361.47 | $ 600.50 | $ - | $ 554.00 |
5 | 0 | 49 | M | CAID | $ 7,788.51 | $ 478.85 | $ 610.00 | $ 736.50 | $ 500.85 |
5 | 0 | 59 | M | BC | $ 8,191.10 | $ 661.65 | $ 800.00 | $ 117.50 | $ 445.30 |
3 | 1 | 81 | M | CARE | $ 11,117.35 | $ 142.35 | $ 318.00 | $ 736.50 | $ 50.85 |
2 | 0 | 74 | F | CARE | $ 5,624.54 | $ 149.69 | $ 542.00 | $ 1,348.50 | $ 326.40 |
4 | 0 | 77 | F | CARE | $ 4,574.92 | $ 159.82 | $ 186.50 | $ - | $ 612.50 |
3 | 0 | 78 | F | CARE | $ 3,644.36 | $ 126.46 | $ 220.50 | $ - | $ 30.90 |
2 | 0 | 73 | F | CARE | $ 2,937.92 | $ 50.67 | $ 268.00 | $ 673.50 | $ 134.65 |
6 | 0 | 67 | M | INS | $ 3,944.78 | $ 602.98 | $ 462.00 | $ 93.50 | $ - |
3 | 0 | 80 | M | CARE | $ 6,366.10 | $ 169.15 | $1,130.00 | $ 971.50 | $ - |
3 | 0 | 77 | F | CARE | $ 4,992.01 | $ 148.66 | $ 569.50 | $ 818.50 | $ 272.25 |
4 | 0 | 73 | F | CARE | $ 6,929.35 | $ 679.25 | $1,286.50 | $ 1,135.50 | $ 766.70 |
5 | 0 | 67 | M | CARE | $ 5,595.42 | $ 582.56 | $ 714.00 | $ 980.00 | $ 848.75 |
3 | 0 | 86 | M | CARE | $ 3,466.70 | $ 78.15 | $ 408.50 | $ 187.00 | $ 338.25 |
7 | 0 | 82 | F | CARE | $ 7,289.77 | $ 162.77 | $ 821.50 | $ 818.50 | $ 825.85 |
7 | 0 | 84 | F | CARE | $ 6,375.95 | $ 275.30 | $1,692.50 | $ 93.50 | $ 755.65 |
3 | 0 | 73 | F | BC | $ 3,585.62 | $ 276.29 | $ 578.00 | $ 951.50 | $ 40.00 |
4 | 0 | 82 | M | CARE | $ 5,970.45 | $ 156.45 | $ 711.50 | $ 738.50 | $1,084.85 |
8 | 0 | 62 | F | CARE | $ 10,578.14 | $ 696.94 | $1,329.35 | $ 783.65 | $2,058.75 |
2 | 0 | 84 | M | CARE | $ 2,223.60 | $ 36.25 | $ 229.00 | $ 725.00 | $ 253.10 |
3 | 0 | 89 | F | CARE | $ 2,250.50 | $ 182.70 | $ 205.50 | $ 117.50 | $ 226.85 |
1 | 0 | 84 | M | CARE | $ 1,644.55 | $ 19.40 | $ 142.00 | $ 107.00 | $ 137.00 |
4 | 0 | 81 | F | CARE | $ 2,491.45 | $ 84.45 | $ 114.00 | $ 93.50 | $ 381.70 |
3 | 0 | 81 | F | CARE | $ 1,691.50 | $ 10.45 | $ 114.00 | $ 64.50 | $ 12.95 |
6 | 0 | 78 | M | CARE | $ 7,931.92 | $ 746.06 | $ 707.00 | $ 200.50 | $2,030.60 |
5 | 0 | 84 | F | CARE | $ 5,121.97 | $ 479.99 | $ 981.35 | $ 930.00 | $ 314.90 |
5 | 0 | 37 | M | BC | $ 6,940.75 | $ 768.55 | $1,791.50 | $ 825.00 | $ 922.10 |
7 | 0 | 62 | M | BC | $ 12,088.08 | $ 592.43 | $ 971.80 | $ 1,566.00 | $2,170.60 |
1 | 0 | 80 | F | CARE | $ 2,325.60 | $ 101.50 | $ 440.50 | $ 107.00 | $ 69.05 |
2 | 0 | 80 | F | CARE | $ 4,452.78 | $ 160.38 | $ 276.50 | $ 107.00 | $ 720.00 |
4 | 0 | 73 | M | CARE | $ 6,157.43 | $ 193.61 | $ 540.50 | $ 725.00 | $1,140.57 |
11 | 0 | 80 | F | CARE | $ 21,474.90 | $ 1,420.14 | $2,302.00 | $ 2,128.00 | $2,765.60 |
3 | 2 | 80 | F | CARE | $ 8,566.51 | $ 446.11 | $1,393.50 | $ 214.00 | $1,505.55 |
2 | 0 | 80 | F | CARE | $ 4,910.27 | $ 307.97 | $ 707.00 | $ 107.00 | $ 820.70 |
1 | 0 | 81 | F | CARE | $ 3,275.03 | $ 152.28 | $ 414.50 | $ 107.00 | $ 573.05 |
4 | 0 | 39 | M | CAID | $ 12,080.81 | $ 708.40 | $ 971.50 | $ 1,374.00 | $ 881.10 |
6 | 0 | 86 | M | CARE | $ 7,436.85 | $ 242.70 | $ 700.50 | $ 1,183.00 | $ 834.65 |
8 | 0 | 79 | M | CARE | $ 15,624.20 | $ 462.40 | $2,372.00 | $ 2,965.65 | $2,097.17 |
4 | 0 | 87 | M | CARE | $ 4,590.48 | $ 414.40 | $ 966.00 | $ 187.00 | $ 667.65 |
2 | 0 | 53 | F | CARE | $ 3,232.63 | $ 200.90 | $ 320.00 | $ 93.50 | $ 425.80 |
3 | 0 | 83 | F | CARE | $ 3,768.11 | $ 216.01 | $ 312.50 | $ 196.50 | $ 917.75 |
7 | 0 | 80 | F | CARE | $ 9,862.26 | $ 432.36 | $1,504.00 | $ 321.00 | $1,555.25 |
7 | 0 | 79 | F | CARE | $ 10,626.42 | $ 449.47 | $1,011.40 | $ 107.00 | $2,113.85 |
4 | 0 | 72 | F | CARE | $ 6,967.99 | $ 176.89 | $1,062.00 | $ 1,658.20 | $ 221.60 |
3 | 0 | 77 | F | CARE | $ 5,891.25 | $ 260.65 | $1,215.50 | $ 107.00 | $ 465.50 |
3 | 0 | 81 | F | CARE | $ 4,756.91 | $ 104.66 | $ 893.50 | $ 725.00 | $ 87.10 |
9 | 0 | 67 | F | OTHR | $ 8,096.93 | $ 473.98 | $ 862.50 | $ 818.50 | $1,708.65 |
4 | 0 | 80 | M | CARE | $ 4,620.59 | $ 178.59 | $ 535.00 | $ 296.00 | $ 307.90 |
6 | 0 | 67 | F | OTHR | $ 5,796.49 | $ 472.74 | $1,007.00 | $ 93.50 | $1,399.30 |
1 | 0 | 88 | M | CARE | $ 1,483.39 | $ 30.34 | $ 172.00 | $ 214.00 | $ 136.30 |
1 | 0 | 88 | F | CARE | $ 2,510.05 | $ 82.45 | $ 485.00 | $ 188.50 | $ 148.65 |
6 | 0 | 92 | F | CARE | $ 10,185.83 | $ 403.13 | $1,054.50 | $ 832.00 | $1,920.75 |
3 | 0 | 85 | F | CARE | $ 3,391.90 | $ 49.60 | $ 588.50 | $ 725.00 | $ 44.45 |
5 | 0 | 85 | M | CARE | $ 8,418.13 | $ 281.48 | $ 758.00 | $ 93.50 | $ 75.20 |
3 | 0 | 80 | M | CARE | $ 4,346.47 | $ 108.11 | $ 411.00 | $ 725.00 | $ 266.05 |
2 | 0 | 98 | F | CARE | $ 2,043.85 | $ 49.20 | $ 214.00 | $ 186.50 | $ 268.55 |
3 | 0 | 74 | F | CARE | $ 2,594.85 | $ 131.60 | $ 496.00 | $ 155.50 | $ - |
5 | 0 | 77 | M | CARE | $ 5,499.36 | $ 153.91 | $ 289.50 | $ 660.00 | $ 528.20 |
9 | 0 | 53 | F | CARE | $ 11,244.45 | $ 500.30 | $ 657.00 | $ 738.50 | $1,154.80 |
7 | 0 | 93 | M | CARE | $ 6,565.55 | $ 710.00 | $ 725.00 | $ 117.50 | $ 793.10 |
4 | 0 | 83 | F | CARE | $ 6,031.15 | $ 294.60 | $1,313.00 | $ 351.25 | $ 684.15 |
7 | 0 | 80 | M | CARE | $ 4,912.76 | $ 468.01 | $ 333.50 | $ 187.00 | $ 930.65 |
3 | 0 | 79 | M | CARE | $ 6,182.45 | $ 234.85 | $ 843.50 | $ 832.00 | $ 304.30 |
3 | 0 | 87 | F | CARE | $ 4,218.95 | $ 183.45 | $ 309.50 | $ 99.00 | $ - |
16 | 0 | 59 | M | CARE | $ 40,231.27 | $ 2,768.32 | $4,618.00 | $ 1,609.00 | $8,792.50 |
3 | 0 | 81 | F | CARE | $ 3,608.95 | $ 290.77 | $ 457.50 | $ 941.00 | $ 225.90 |
4 | 0 | 94 | F | CARE | $ 3,041.44 | $ 109.59 | $ 484.00 | $ - | $ 569.00 |
1 | 0 | 33 | F | CAID | $ 1,581.93 | $ 141.78 | $ 539.50 | $ 107.00 | $ 230.75 |
2 | 0 | 78 | F | CARE | $ 1,468.48 | $ 175.18 | $ - | $ - | $ 237.65 |
2 | 0 | 29 | F | CARE | $ 2,294.55 | $ - | $ 209.00 | $ 187.00 | $ 688.75 |
2 | 0 | 80 | F | CARE | $ 7,138.72 | $ 402.98 | $1,317.50 | $ 300.50 | $ 261.45 |
3 | 0 | 63 | F | INS | $ 3,845.96 | $ 182.31 | $ 443.00 | $ 93.50 | $ 245.15 |
4 | 0 | 86 | M | CARE | $ 5,355.23 | $ 376.34 | $ 890.90 | $ 951.00 | $ 361.65 |
4 | 0 | 96 | M | CARE | $ 4,573.05 | $ 563.40 | $1,310.00 | $ 296.00 | $ 25.75 |
5 | 0 | 89 | M | CARE | $ 5,023.11 | $ 272.51 | $1,039.50 | $ 187.00 | $ 683.45 |
5 | 0 | 80 | M | CARE | $ 4,238.30 | $ 112.15 | $ 654.75 | $ 725.00 | $ 290.45 |
5 | 0 | 55 | F | CAID | $ 6,885.73 | $ 351.58 | $ 838.50 | $ 738.50 | $ 792.80 |
5 | 0 | 73 | M | CARE | $ 5,447.63 | $ 224.98 | $ 660.00 | $ 912.00 | $1,113.00 |
7 | 0 | 67 | F | CARE | $ 6,257.66 | $ 349.81 | $ 761.85 | $ 351.50 | $ 708.90 |
2 | 0 | 75 | M | CARE | $ 4,601.00 | $ 655.64 | $1,008.00 | $ 214.00 | $ 486.45 |
Sol:
Using Excel:
First select the data columns of Patient's Age (In Years) and Total Charges then go to Insert menu
and select the Scatter .
Click Ok.
Scatter Plot for Patient's Age (In Years) Vs. Total Charges:
This is the Scatter plot with linear regression line.
The above scatter plot suggested that there is no linear relation between patient’s age and total charges, and yet a perfect curved (or "curvilinear" relationship) exists.
Descriptive Statistics for Males Vs. Womens for Patient's Age:
Interpretations:
Mean:
The mean is the average of the data, which is the sum of all the observations divided by the number of observations.
On average, male patient's age (in years) is 74.67164179 While, female patient's age (in years) is 75.12676056.
Median:
The median is the midpoint of the data set. This midpoint value is the point at which half the observations are above the value and half the observations are below the value. The median is determined by ranking the observations and finding the observation that are at the number [N + 1] / 2 in the ranked order. If the number of observations are even, then the median is the average value of the observations that are ranked at numbers N / 2 and [N / 2] + 1.
For the male patient's age (in years) data, the median is 77. And for the male patient's age (in years) data, the median is 78.
Mode:
The mode is the value that occurs most frequently in a set of observations.
The mode for male and female patient's age (in years) data, is same that is 80.
Range:
The range is the difference between the largest and smallest data values in the sample. The range represents the interval that contains all the data values.
Use the range to understand the amount of dispersion in the data. A large range value indicates greater dispersion in the data. A small range value indicates that there is less dispersion in the data. Because the range is calculated using only two data values, it is more useful with small data sets.
For the male patient's age (in years) data the range is 59 shows the less dispersion in the data and female patient's age (in years) data the range is 69 shows the more dispersion in the data.
Skewness:
Skewness is the extent to which the data are not symmetrical.
For the male patient's age (in years) and female patient's age (in years) data is left skewed.
Because, both have negative values of skewness.
Standard deviation:
The standard deviation is the most common measure of dispersion, or how spread out the data is about the mean.
Use the standard deviation to determine how spread out the data is from the mean. A higher standard deviation value indicates greater spread in the data. A good rule of thumb for a normal distribution is that approximately 68% of the values fall within one standard deviation of the mean, 95% of the values fall within two standard deviations, and 99.7% of the values fall within three standard deviations.
The standard deviation for male patient's age (in years) is about 11.94480749. On average, male patient's age (in years) deviates from the mean by about 11.94480749 years. The standard deviation for female patient's age (in years) is about 12.36808055. On average, female patient's age (in years) deviates from the mean by about 12.36808055 years.
Comment: Both the male and Female has approximately same mean Total Chrg.