Of the amount approved in an appropriation Act under section 5303 of this title that remains after allocations pursuant to paragraphs (1), (2), and (3) of subsection (a), 30 per centum shall be allocated among the States for use in nonentitlement areas. The allocation for each State shall be the greater of an amount that bears the same ratio to the allocation for such areas of all States available under this subparagraph as either—
(A) the average of the ratios between— (i) the population of the nonentitlement areas in that State and the population of the nonentitlement areas of all States; (ii) the extent of poverty in the nonentitlement areas in that State and the extent of poverty in the nonentitlement areas of all States; and (iii) the extent of housing overcrowding in the nonentitlement areas in that State and the extent of housing overcrowding in the nonentitlement areas of all States; or
(B) the average of the ratios between— (i) the age of housing in the nonentitlement areas in that State and the age of housing in the nonentitlement areas of all States; (ii) the extent of poverty in the nonentitlement areas in that States and the extent of poverty in the nonentitlement areas of all States; and (iii) the population of the nonentitlement areas in that State and the population of the nonentitlement areas of all States.
In determining the average of the ratios under subparagraph (A) the ratio involving the extent of poverty shall be counted twice and each of the other ratios shall be counted once; and in determining the average of the ratios under subparagraph (B), the ratio involving the age of housing shall be counted two and one-half times, the ratio involving the extent of poverty shall be counted one and one-half times, and the ratio involving population shall be counted once. The Secretary shall, in order to compensate for the discrepancy between the total of the amounts to be allocated under this paragraph and the total of the amounts available under such paragraph, make a pro rata reduction of each amount allocated to the nonentitlement areas in each State under such paragraph so that the nonentitlement areas in each State will receive an amount which represents the same percentage of the total amount available under such paragraph as the percentage which the nonentitlement areas of the same State would have received under such paragraph if the total amount available under such paragraph had equaled the total amount which was allocated under such paragraph.