I have 31 cars, 7 are defective. whats the ratio

well, one ratio is clearly 31:7

there are others possible, depending on what it is you're comparing.