We model demand for quality differentiated goods to derive a relationship between trade costs and the quality composition of trade. Detailed data on traded goods' prices, quantities and shipping costs for many importers and exporters are used to test these predictions. These data provide a...