In the case of a nonresident alien individual, the deductions shall be allowed only for purposes of section
871
(b) and (except as provided by subsection (b)) only if and to the extent that they are connected with income which is effectively connected with the conduct of a trade or business within the United States; and the proper apportionment and allocation of the deductions for this purpose shall be determined as provided in regulations prescribed by the Secretary.