When is a variable chosen for a card in which that variable is not defined by the card itself?When deciding X, is it decided by the effect including X or is it decided by choosing an X and then resolving the effect with X in it? 2a. The variable is chosen whenever it is necessary to resolve the effect. So for Vamp, you do not have to set the value of X until the run is successful. For Psychographics, you have to set the value when playing it because it is part of the cost. So option 1 is correct.
2b. X is a value that is set at one time. So you spend X credits from Vamp, but you cannot spend more credits than you have. With Power Shutdown, you trash X cards from your deck, but you do not see the cards that are trashed until X is defined. You cannot trash more than the number of cards in your deck, either.