Generation

generate functionTue, 14 Mar 2023

John is looking to invest in the Canadian Stock Market. In particular, John wants to maximize his received cash flows, so he would like to invest in companies that have a high dividend per share ratio. Load the FinanceCanada.csv dataset. This contains randomly chosen Canadian companies sorted into seven industry groups (1=real estate, 2=financial, etc), along with a variety of financial metrics. To direct his investing, John would like to test whether certain types of industries have on average a higher dividend per share ratio. a) State the null and alternative hypotheses

> df <- read.csv("FinanceCanada.csv") > df sector marketCap cash debt profit revenue price dividend 1 Real Estate 3.391880 2.817079 51 2.92786 5.609708 1.591719 0.000000e+00 2 Financials 15.914390 0.948429 48 3.36506 6.037782 7.684375 5.824243e-03 3 Industrials 13.367450 1.573441 39 2.84042 5.111682 6.977952 2.966864e-03 4 Industrials 12.686620 1.626580 23 1.97762 3.917748 5.824494 4.395904e-03 5 Industrials 12.288600 1.396398 40 3.21616 5.455960 5.846487 5.084980e-03 6 Industrials 11

Questions about programming?Chat with your personal AI assistant